code design question

K

Karl Hungus

How would you design your code if you wanted to have a menu that highlighted
when it was in the proper section. for example on cnn.com when you click on
say "weather", then when youre in the weather section the menu item is
highlighted.

My site uses XML to configure my menu. Im transforming that with XSL. The
menu buttons are artwork (png) generated with GDI+. I need to pass the
active section when the user clicks on the button, so the XML can be
slightly altered to indicate which is the active section when the page
reloads. Its a small site and I intend to do it all dynamically with one
aspx page. The XSL checks for the active menu item and changes the image
based on that attribute.

Normally I would just use a query string to pass the id of the active
section when the user clicked on the menu button, but this doesnt seem very
..net-ish. Should I use some server/user control to handle it? is there an
acceptable way to use querystrings in .net?

Hopefully this isnt incredibly vague.

Thanks in Advance
Karl
 
H

Harsh Thakur

Hi Karl,

As I understand your problem, you basically want to
persist the id of the menu-item clicked.
Well, if you don't want to use querystrings, you could put
the id of the menu-item into a Session var when you handle
the menu click.
Just a thought.

HTH
Regards
Harsh Thakur
 

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

Top