Active menus: how can I do this elegantly?

K

Ken Fine

I'm an ASP.NET newbie, so please be gentle...

I want to make an "active" navigation menu that indicates selection to the
user by turning the nav text red. One easy way to do this is to compare a
QueryString to a value, and write red text if it matches.

The really dumb way to do this would be to define if...else conditions for
each item on the menu.

It seems like a better way would be to have a dynamic comparison happen. I'm
not sure how to set this up. Can someone point me in the right direction?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top