new Menu control and relating pages in a 'grouping'

A

Al Cadalzo

IN ASP.NET 2.0 I am using a menu control in the MasterPage:
<asp:Menu ID="NavBar" runat="server" DataSourceID="SiteMapDataSource1"
MaximumDynamicDisplayLevels="0"
Orientation="Horizontal" Width=100% CssClass=menu>

In the SiteMap I have siteMapNodes for the top level pages, e.g. 'Fruits |
Vegetables | Poultry' etc.
These correspond to top-level pages: F1.aspx, V1.aspx, and P1.aspx
respectively. Clicking on the menu takes me to the correct page
and also highlights the menu item that is active, e.g. 'Vegetables'. I use
the style:
<StaticSelectedStyle CssClass="menuselected" BackColor=#3399ff />

There is a button on each page that takes me to another page that is not a
top-level page. For example. clicking on the button on
V1.aspx takes me to V2.aspx, which is still related to 'Vegetables'. I am
losing the highlighting of 'Vegetables' in the menu bar
since it doesn't know that this page is part of the 'Vegetables' group of
pages. How do I tell it to keep the highlight on
'Vegetables' in the menu bar? I tried adding V2 as a subnode of V1 in the
sitemap, but that didn't work:

<siteMapNode title="Vegetables" url="V1.asp">
<siteMapNode title="Tomatoes" url="V2.aspx">

Do I need to create a dynamic submenu of the main menu and then disable it?
We don't want the user to be able to go directly to
any of the subpages without going through a top-level page (i.e. F1, V1 or
P1.aspx).

Thanks,
Al
 

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,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top