How do I create tabbed navigation with the ‘Current’ tab highlighted in the UI?
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.
Before MVC I looked at the file path and figured out which tab was currrent. Now it’s a lot easier, you can assign the current tab based on the current controller.
Check it out …
Most of the work happens in the usercontrol.
Then in your .ascx part of the usercontol call into the SetClass method to check the link against the dict. Like so:
All you need now is the CSS to highlight your current tab. There are a bunch of different ways to do this, but you can get started with some ideas here: http://webdeveloper.econsultant.com/css-menus-navigation-tabs/ Oh, and don’t forget to put the usercontrol on your page (or MasterPage) …