newbie: Problems creating asp.net 2.0 Menu


J

Jeff

Hey

ASP.NET 2.0

On my web page I got 2 menu controls: menu A is a horizontal menu displaying
menuitems at the top level. Menu B displays the submenuitems related to what
is selected in menu A. Menu A and Menu B are using the same sitemap
provider.. This works fine today.

But now I want to improve this a bit:
I still want menu B to show submenuitems related to menu A.. but now I also
want it show some other submenuitems which isn't affect by what is selected
in menu A

Example:
SideMenu
Item A
Item B
Item C
SideMenu B
Item D
Item E
Item F

In the example above SideMenu is related to what select in menu A, but
SideMenu B and it's submenuitems isn't related to menu A...

Here is the content of a sitemap file from my project:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="#" title="Main Menu A" description="" >
<siteMapNode url="#" title="Sub Menu 1" description="" />
<siteMapNode url="#" title="Sub Menu 2" description="" />
</siteMapNode>
<siteMapNode url="#" title="Main Menu B" description="" >
<siteMapNode url="#" title="Sub Menu 3" description="" />
<siteMapNode url="#" title="Sub Menu 4" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>

This is the menu B markup in my web page:
<asp:Menu ID="mnuHeader"
runat="server"
DataSourceID="smdsHeader"
MaximumDynamicDisplayLevels="0"
Orientation="Horizontal"
StaticDisplayLevels="2"
OnMenuItemDataBound="mnuHeader_MenuItemDataBound"
StaticMenuItemStyle-CssClass="MainMenu"
StaticHoverStyle-CssClass="MainMenu:hover" />
<asp:SiteMapDataSource ID="smdsHeader" runat="server"
SiteMapProvider="Members" />

I'm wondering about how to configure (both in .sitemap file and in markup)
these additional submenu items so they are not related to what is selected
in menu A

Best Regards

Jeff
 
Ad

Advertisements

J

Jeff

Look at the bottom

Jeff said:
Hey

ASP.NET 2.0

On my web page I got 2 menu controls: menu A is a horizontal menu
displaying menuitems at the top level. Menu B displays the submenuitems
related to what is selected in menu A. Menu A and Menu B are using the
same sitemap provider.. This works fine today.

But now I want to improve this a bit:
I still want menu B to show submenuitems related to menu A.. but now I
also want it show some other submenuitems which isn't affect by what is
selected in menu A

Example:
SideMenu
Item A
Item B
Item C
SideMenu B
Item D
Item E
Item F

In the example above SideMenu is related to what select in menu A, but
SideMenu B and it's submenuitems isn't related to menu A...

Here is the content of a sitemap file from my project:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home" description="">
<siteMapNode url="#" title="Main Menu A" description="" >
<siteMapNode url="#" title="Sub Menu 1" description="" />
<siteMapNode url="#" title="Sub Menu 2" description="" />
</siteMapNode>
<siteMapNode url="#" title="Main Menu B" description="" >
<siteMapNode url="#" title="Sub Menu 3" description="" />
<siteMapNode url="#" title="Sub Menu 4" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>

This is the menu B markup in my web page:
<asp:Menu ID="mnuHeader"
runat="server"
DataSourceID="smdsHeader"
MaximumDynamicDisplayLevels="0"
Orientation="Horizontal"
StaticDisplayLevels="2"
OnMenuItemDataBound="mnuHeader_MenuItemDataBound"
StaticMenuItemStyle-CssClass="MainMenu"
StaticHoverStyle-CssClass="MainMenu:hover" />
<asp:SiteMapDataSource ID="smdsHeader" runat="server"
SiteMapProvider="Members" />

I'm wondering about how to configure (both in .sitemap file and in markup)
these additional submenu items so they are not related to what is selected
in menu A

Best Regards

Jeff

the menu markup I posted in my previous post is NOT for menu B it is for
menu A

Here is the markup of menu B:
<asp:Menu ID="mnuSidemenu"
runat="server"
DataSourceID="smdsHeader"
MaximumDynamicDisplayLevels="0"
Orientation="Vertical"
StaticDisplayLevels="2"
StaticMenuItemStyle-CssClass="menuitem"
StaticHoverStyle-CssClass="menuitem:hover"
OnMenuItemDataBound="mnuSidebar_MenuItemDataBound" >
</asp:Menu>

I still wondering how to solve this

Jeff
 
J

Jeff

I've solved this by using 2 menu controls


Jeff said:
Look at the bottom



the menu markup I posted in my previous post is NOT for menu B it is for
menu A

Here is the markup of menu B:
<asp:Menu ID="mnuSidemenu"
runat="server"
DataSourceID="smdsHeader"
MaximumDynamicDisplayLevels="0"
Orientation="Vertical"
StaticDisplayLevels="2"
StaticMenuItemStyle-CssClass="menuitem"
StaticHoverStyle-CssClass="menuitem:hover"
OnMenuItemDataBound="mnuSidebar_MenuItemDataBound" >
</asp:Menu>

I still wondering how to solve this

Jeff
 
Ad

Advertisements

J

Jeff

I didn't find a solution so I had to use a workaround. Using 2 menu controls
instead of only 1

So I consider this thread for solved
 

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