我ActionLink
在 MVC4 中使用 HTML。我需要删除QueryStrings
使用formCollection
. 如何使用它?
这是我的代码:
<div class="mainNav">
<nav>
<ul>
@for (int i = 0; i < Query.Count - 1; i++)
{
<li>@Html.ActionLink(Query[i].Parent_Menu,"ManageContent","Home", new { CmsFid = Query[i].CMSFunction_Id,ParentMenu=Query[i].Parent_Menu },new { @style = "color:#FFF;text-decoration:none" })</li>
}
@for(int i=Query.Count-1;i<Query.Count;i++)
{
<li>@Html.ActionLink(Query[i].Parent_Menu,"ManageContent","Home", new { CmsFid = Query[i].CMSFunction_Id,ParentMenu=Query[i].Parent_Menu },new {@class="last", @style = "color:#FFF;text-decoration:none" })</li>
}
</ul>
</nav>
</div>