When, home menu is active (selected), render this
<li class="active"><a href = "~/Home" >Home</a></li>
Otherwise, when home menu is inactive (not selected), render this
<li><a href = "~/Home" >Home</a></li>
When, home menu is active (selected), render this
<li class="active"><a href = "~/Home" >Home</a></li>
Otherwise, when home menu is inactive (not selected), render this
<li><a href = "~/Home" >Home</a></li>
Try this type it May Help You.
<li class="@(ViewContext.RouteData.Values["Action"].ToString() == "Home" ? "active" : "")"><a href = "~/Home" >Home</a></li>