Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Adding dynamic CSS to List Item using MVC

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





  • This post first appeared on Asp.netSourceCodes, please read the originial post: here

    Share the post

    Adding dynamic CSS to List Item using MVC

    ×

    Subscribe to Asp.netsourcecodes

    Get updates delivered right to your inbox!

    Thank you for your subscription

    ×