You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
610 B
23 lines
610 B
<ul class="nav navbar-nav">
|
|
<li class="@GetClass("Index","Home")">
|
|
<a href="@Url.Action("Index","Home")">
|
|
首页
|
|
</a>
|
|
</li>
|
|
<li class="@GetClass("Node","Home")">
|
|
<a href="@Url.Action("Node","Home")">
|
|
节点
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
@functions{
|
|
public string GetClass(string action,string controller)
|
|
{
|
|
if (this.ViewContext.RouteData.Values["action"].ToString()==action&&
|
|
this.ViewContext.RouteData.Values["controller"].ToString()==controller)
|
|
{
|
|
return "active";
|
|
}
|
|
return "";
|
|
}
|
|
} |