Question : Hide root node in Menu using xmldatasource

Hello, Im using a menu control that is populated by an XmlDataSource from an XMl file. This works great!

I do not want to have the root node displayed. How can I modify my code to hide the home node?

Currently it is displayed like this:
HOME
     Products

I need it to display like this:
Products




Here is my code

Memu and datasource:
   s="4"
                                StaticDisplayLevels="2" DynamicVerticalOffset="1"  >
                               
                                   
                                                                            ValueField="text" />
                               

                           

                           
                           



XML file:



 
    >>
    nu>
     

 

Answer : Hide root node in Menu using xmldatasource

Not sure about the XML file you have specified. But you can achieve the same results by using the web.sitemap file.

You need to set ShowStartingNode="false" on the sitemapdatasource control. For example:

web.sitemap file
----------------------------------

http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
 
    title="Dashboard" description="" />
   
   
   
   
   
   
   
   
 




.aspx page
----------------------------
Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1">




Hope this helps.
Random Solutions  
 
programming4us programming4us