Hi,
In this post i have explained
how to add dynamic css styles to list menu using MVC. Here controller name is "Home" and action name is "Index".
If user select this action then we are applying class "selected" to the list item.
&& ViewContext.RouteData.Values["controller"].TOString().Equals("Home") ? "class=selected" : "")>
home
In this post i have explained
how to add dynamic css styles to list menu using MVC. Here controller name is "Home" and action name is "Index".
If user select this action then we are applying class "selected" to the list item.
&& ViewContext.RouteData.Values["controller"].TOString().Equals("Home") ? "class=selected" : "")>
home