开发者

Code on MVC Master Page

开发者 https://www.devze.com 2022-12-19 09:45 出处:网络
I want to write a code on the mvc mast开发者_如何学Cer page please tell how shall I do that,My requirement is that I want to show the tab clicked as highlighted.

I want to write a code on the mvc mast开发者_如何学Cer page please tell how shall I do that,My requirement is that I want to show the tab clicked as highlighted.

Please help me Thanks Ritz


use css :visited pseudo-class on link


Use css as stated by Jack and check the information on your current route to see what view your displaying, something like

Html.ViewContext.Controller.ControllerContext.RouteData.GetRequiredString("controller")

to get the current controller or replace controller with whatever data you need from the route. Then just add a condition to add a selected class or not on your tab.

0

精彩评论

暂无评论...
验证码 换一张
取 消