views:

48

answers:

2

Hello All,

I want to write a code on the mvc master 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

A: 

use css :visited pseudo-class on link

Jack
A: 

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.

moi_meme