我不确定从哪里开始在 MVC 项目中实现选项卡。这是问题所在。我想在部分视图中实现选项卡,但我希望这些选项卡对我的所有控制器和视图都可用。当我对选项卡进行编码时,我需要知道当前控制器和视图,以便我可以使用选项卡 QueryString 修改 Html.ActionLink()。
我该怎么办
<%= Html.ActionLink(QuestionSort.SortArray[0], "Current View", "Current Controller", null, new { rel = "nofollow" })%>
<% for (int x = 1; x < QuestionSort.SortArray.Length; x++)
{ %>
<%= Html.ActionLink(QuestionSort.SortArray[x], "Current View", "Current Controller", new { sort = Server.UrlEncode(QuestionSort.SortArray[x]) }, new { rel = "nofollow" })%>
<% } %>