I have an ascx component, that holds two-level menu, because there are several user types, and the menu needs to be computed on server.
Anyways - I'm also doing the highlighting of current menu item on server (adding a selected class/css to an item). Highlighting with javascript is not good option, because there is content in datagrids, that causes postback and needs to remain the menu in the same position as selected value is. So I am doing this as some kind of mapping with a hashtable (e.g. pairs (url-of-the-site, menu-item-to-highlight)), and i have to include a mapping for every site my web application contains in order i want to have menus highlighted... so somehow it bothers me that there has to be a better way to do this. are there any better techniques?