1
특정 페이지에서 하이라이트를 표시하도록 내비게이터를 만들려고합니다. 나는 다음과 같은 것을 가지고있다 :MVC3 면도기 수프 - 템플릿?
<li>
@if (Request.Url.AbsoluteUri.ToLowerInvariant().Contains("registration"))
{
@Html.ActionLink("Request an Invite", "index", "registration", null, new { @class = "active" })
}
else
{
@Html.ActionLink("Request an Invite", "index", "registration")
}
</li>
<li>
@if (Request.Url.AbsoluteUri.ToLowerInvariant().Contains("login"))
{
@Html.ActionLink("Login", "index", "login", null, new { @class = "active" })
}
else
{
@Html.ActionLink("Login", "index", "login")
}
</li>
확실한이 방법으로 더 적은 스프를 만들 수 있을까? 누군가 초보자를 도울 수 있습니까?
감사 제임스 우 들리
정말 고맙습니다. ! –