Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 27th, 2009, 05:39 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Coventry, Warwickshire, United Kingdom.
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
Default Multiple Menus

I have a site which has a menu on the MasterPage. There are no subsidiary popups from this menu. On a particular page I want to add another menu in the right sidebar which will have one or more subsidiary pages per menu item. In the .sitemap file I have the following:
Code:
<siteMapNode>
 <siteMapNode url="mainMenu.aspx"title="MasterPage Menu"description=""roles="*">
   <siteMapNode url="Default.aspx"title="Home"description=""roles="*">
   </siteMapNode>
           "etc"
 </siteMapNode>
 <siteMapNode url="ClubRoom.aspx"title="ClubRoom Menu"description=""roles="*">
   <siteMapNode url="Fixtures.aspx"title="Fixtures"description=""roles="*">
           "Subsidiary nodes to 3 levels"
   </siteMapNode>
 </siteMapNode>
</siteMapNode>
My menu controls are as follows:

MasterPage
Code:
<asp:SiteMapDataSourceID="RLSBC_MenuProvider"runat="server"ShowStartingNode="False"StartingNodeUrl="mainMenu.aspx"/>
ClubRoom
Code:
<asp:SiteMapDataSourceID="RLSBC_SidebarProvider"runat="server"ShowStartingNode="False"StartingNodeUrl="ClubRoom.aspx"/>
The MasterPage menu displays exactly as I want it. I don't get any errors when the ClubRoom is displayed; but then again I don't get any menu items either.

Is it possible to do what I want?
__________________
Thanks, wagham
  #2 (permalink)  
Old March 27th, 2009, 07:58 PM
Friend of Wrox
Points: 894, Level: 11
Points: 894, Level: 11 Points: 894, Level: 11 Points: 894, Level: 11
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2005
Location: London, , United Kingdom.
Posts: 166
Thanks: 2
Thanked 33 Times in 33 Posts
Default

Hi Wagham,

Yes it is indeed possible and I managed to get your very menu running.
Is it possible to post your ClubRoom menu code, just in case there is something strange with that, and maybe a couple more levels of the sitemap? I can't see any other issues with what you've got.

Phil
  #3 (permalink)  
Old March 30th, 2009, 05:17 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Coventry, Warwickshire, United Kingdom.
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
Default

My code for the menu that appears at the top of every page on the Masterpage.aspx is
Code:
<divid="mainMenu">
<asp:SiteMapDataSourceID="RLSBC_MenuProvider"runat="server"ShowStartingNode="False"StartingNodeUrl="mainMenu.aspx"/>
<asp:MenuID="Menu1"runat="server"CssClass="mainMenu"SkinID="mainMenu"DataSourceID="RLSBC_MenuProvider">
<StaticMenuItemStyleHorizontalPadding="10px"VerticalPadding="2px"Font-Size="10pt"/>
<DynamicMenuItemStyleHorizontalPadding="5px"VerticalPadding="2px"/>
<StaticHoverStyleBackColor="#00007F"ForeColor="White"/>
<DynamicHoverStyleBackColor="#00007F"ForeColor="White"/>
<StaticSelectedStyleBackColor="#507CD1"/>
<DynamicSelectedStyleBackColor="#507CD1"/>
<DynamicMenuStyleBackColor="#B5C7DE"/>
</asp:Menu>
</div>
My code for the menu that appears on the ClubRoom page on a sidebar on the ClubRoom.aspx is
Code:
<divid="sideMenu">
<asp:SiteMapDataSourceID="RLSBC_SidebarProvider"runat="server"ShowStartingNode="False"StartingNodeUrl="ClubRoom.aspx"/>
<asp:MenuID="Menu1"runat="server"CssClass="sideMenu"SkinID="sideMenu"DataSourceID="RLSBC_SidebarProvider">
<StaticMenuItemStyleHorizontalPadding="10px"VerticalPadding="2px"Font-Size="10pt"/>
<DynamicMenuItemStyleHorizontalPadding="5px"VerticalPadding="2px"/>
<StaticHoverStyleBackColor="#00007F"ForeColor="White"/>
<DynamicHoverStyleBackColor="#00007F"ForeColor="White"/>
<StaticSelectedStyleBackColor="#507CD1"/>
<DynamicSelectedStyleBackColor="#507CD1"/>
<DynamicMenuStyleBackColor="#B5C7DE"/>
</asp:Menu>
</div>
The .sitemap code is
Code:
<siteMapxmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode>
<siteMapNodeurl="ClubRoom.aspx"title="ClubRoom Menu"description=""roles="*">
<siteMapNodeurl="Fixtures.aspx"title="Fixtures"description=""roles="*">
<siteMapNodeurl="MensMatches.aspx"title="Men's Matches"description=""roles="*">
</siteMapNode>
<siteMapNodeurl="LadiesMatches.aspx"title="Ladies' Matches"description=""roles="*">
</siteMapNode>
<siteMapNodeurl="CourierCup.aspx"title="Courier Cup"description=""roles="*">
</siteMapNode>
</siteMapNode>
</siteMapNode>
<siteMapNodeurl="mainMenu.aspx"title="MasterPage Menu"description=""roles="*">
<siteMapNodeurl="Default.aspx"title="Home"description=""roles="*">
</siteMapNode>
<siteMapNodeurl="ClubRoom/ClubRoom.aspx"title="Club Room"description=""roles="*">
</siteMapNode>
<siteMapNodeurl="Anonymous/Contact.aspx"title="Contact"description=""roles="*">
</siteMapNode>
<siteMapNodeurl="Administration/Administration.aspx"title="Admin"description=""roles="Administrators">
</siteMapNode>
</siteMapNode>
</siteMapNode>
</siteMap>

The code in the .skin file is
Code:
<asp:MenuSkinID="mainMenu"runat="server"BackColor="#CB3333"StaticSubMenuIndent="10px"
DynamicEnableDefaultPopOutImage="False"DynamicHorizontalOffset="4"Font-Bold="False"
Font-Names="Verdana"Font-Size="Small"ForeColor="Yellow"Height="20px"Orientation="Horizontal"
StaticEnableDefaultPopOutImage="False"/>
<asp:MenuSkinID="sideMenu"runat="server"BackColor="#CB3333"StaticSubMenuIndent="10px"
DynamicEnableDefaultPopOutImage="False"DynamicHorizontalOffset="4"Font-Bold="False"
Font-Names="Verdana"Font-Size="Small"ForeColor="Yellow"Height="20px"Orientation="Vertical"
StaticEnableDefaultPopOutImage="False"/>
The .css file just has positioning commands in it. I've tried to add z-order to the css file just in case it was behind the sidebar but without any success.
__________________
Thanks, wagham
  #4 (permalink)  
Old April 5th, 2009, 04:43 PM
Authorized User
Points: 73, Level: 1
Points: 73, Level: 1 Points: 73, Level: 1 Points: 73, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2008
Location: Coventry, Warwickshire, United Kingdom.
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
Default

I'm not quite sure why, but it is now working with the code apsted above.
__________________
Thanks, wagham
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Menus - Using multiple dropdown boxes Sebastiaan ASP.NET 1.0 and 1.1 Basics 1 April 18th, 2007 06:25 AM
Search with multiple menus forry SQL Language 0 November 5th, 2005 07:23 AM
sub menus matshediso HTML Code Clinic 2 January 31st, 2005 05:15 AM
Menus Frank Schmuck BOOK: Beginning ASP.NET 1.0 1 June 6th, 2003 01:29 PM



All times are GMT -4. The time now is 01:02 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.