A simple submenu from web.sitemap

the submenu doesn't work properly

Page 1 of 1

2 Replies - 17424 Views - Last Post: 06 January 2010 - 08:58 AM Rate Topic: -----

#1 codeaholic   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 06-November 09

A simple submenu from web.sitemap

Posted 04 January 2010 - 09:09 PM

I am trying to create a simple sub menu in my master page.
My web.sitemap looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/" title="Root" description="Root">
	<siteMapNode url="~/Default.aspx" title="Home"  description="Home" />
	<siteMapNode url="~/AboutUs.aspx" title="About Us"  description="About US" />
	<siteMapNode url="~/Projects.aspx" title="Projects And Services" description="Projects And Services" >
	  <!-- the sub menus-->
	  
	  <siteMapNode url ="~/sub1.aspx" title ="my sub 1" description ="sub 1" />
	  <siteMapNode url ="~/sub2.aspx" title ="my sub 2" description ="sub 2" />
	  <!--end sub menus-->
	  
	</siteMapNode>
	
	<siteMapNode url="~/Contact.aspx" title="Contact Us"  description="Contact US" />
  </siteMapNode>
</siteMap>


and the code for my menu and its data source is :
		<asp:Menu ID="Menu3" 
				  runat="server" 
				  CssSelectorClass="PrettyMenu" 
				  EnableViewState="False"
				  DataSourceID="SiteMapDataSource1" BackColor="#F7F6F3" 
			DynamicHorizontalOffset="2" Font-Names="Verdana" Font-Size="0.8em" 
			ForeColor="#7C6F57" StaticSubMenuIndent="10px" Width="250px">
			<StaticSelectedStyle BackColor="#5D7B9D" />
			<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
			<DynamicHoverStyle BackColor="#7C6F57" ForeColor="White" />
			<DynamicMenuStyle BackColor="#F7F6F3" />
			<DynamicSelectedStyle BackColor="#5D7B9D" />
			<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
			<StaticHoverStyle BackColor="#7C6F57" ForeColor="White" />
		   
		</asp:Menu>
		
		<asp:SiteMapDataSource ID="SiteMapDataSource1" 
							   ShowStartingNode="false" runat="server" />



but my menu looks like the attached picture :(
Can anyone suggest how I can fix this.
All I want is only a simple submenu.

Attached image(s)

  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: A simple submenu from web.sitemap

#2 codeaholic   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 06-November 09

Re: A simple submenu from web.sitemap

Posted 05 January 2010 - 06:08 PM

I found the issue.
I had a couple of CSS files messing around with my menu and make it look weird.
I played around with them and managed to fix it.
I think the control at
http://weblogs.asp.n...P.NET-2.0-.aspx

was very handy.
Hope this help someone else who has similar issues .
Was This Post Helpful? 0
  • +
  • -

#3 Jayman   User is offline

  • Student of Life
  • member icon

Reputation: 423
  • View blog
  • Posts: 9,532
  • Joined: 26-December 05

Re: A simple submenu from web.sitemap

Posted 06 January 2010 - 08:58 AM

Glad you were able to get to the bottom of the issue. Thanks for sharing your solution.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1