OK new to MVC. I had asked this question earlier and got an answer but I am wondering if there is a simpler solution.
Say I have a master page with a menu laid out as an
Beside all other solutions you can use this approach to load menus dynamically from Database and make the selected menu active and keep the status across the website.
in the Layout page:
@{Html.RenderPartial("_MenuPartial"); }
@RenderBody()
Then your partial view contains :
To activated the clicked menu, you need a script in the partial view. Also 'active' class in nothing but changing the background color in the CSS.