标签:
1.分部页 _PartialPage.cshtml
@model List<string> <a>完美世界</a>
@foreach (var item in Model)
{
<li>@item</li>
}
2.HomeController.cs 和 index.html
public ActionResult Index()
{
var testObj = new List<string>()
{
"aaa", "bbb", "ccc"
};
return PartialView("_PartialPage", testObj);
}
<div>@Html.Partial("_PartialPage")</div>
3.demo
http://www.itnose.net/detail/6104431.html
标签:
原文地址:http://www.cnblogs.com/hanxingli/p/5366160.html