Navigation menu with highlight in Asp.NET MVC? -


it's simple question. how did stackoverflow menu in asp.net mvc, highlight on page on.

there no mvc special magic makes happen.

i'm sure:

if( httpcontext.current.request.path == "some menu url" ) 

or

if( viewcontext_or_controllercontext.routedata.values["controller"] == "some value")  

is used someplace.

you put code in 3 different locations ( view ( .aspx ), viewmodel, custom htmlhelper ) , require same bit of code.


Comments

Popular posts from this blog

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -