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
Post a Comment