Want to create a horizontal menu from web.sitemap in asp.net The way you currently have it set up, Home is the top node and Services, Products, and Company are below it.
1 2 3 4 5 6 7 8 | <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title="Top Level" description="Top Level"> <siteMapNode url="Home.aspx" title="Home" description="" /> <siteMapNode url="Services.aspx" title="Services" description="" /> <siteMapNode url="Products.aspx" title="Products" description="" /> <siteMapNode url="Company.aspx" title="Company" description="" /> </siteMapNode> </siteMap> |
In your SiteMapDataSource you’ll want to add some new properties
1 2 | <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" StartingNodeOffset="0" ShowStartingNode="false" /> |
This change to the SiteMapDataSource will ignore the Top Level Node and show the 4 nodes underneath it.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.