I need to highlight active link in the menu. My menu is in the master page by the way. I’m looking for the best way to implement this? Any ideas?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The best way to handle this is to write an HTML helper. You could use
RouteData.Values["action"]to get the currently executing action and compare to the menu name and if they match apply a CSS class that will highlight it.And then use this helper to render the menu items: