<asp:SiteMapDataSource runat="server" ID="RelativeSiteMapDataSource" StartFromCurrentNode="False"
ShowStartingNode="False" SiteMapProvider="CatalogSiteMap" />
<asp:Menu runat="server" ID="Navigator" MaximumDynamicDisplayLevels="0" StaticDisplayLevels="2"
Orientation="Vertical" DataSourceID="RelativeSiteMapDataSource" />
In several of my ASPX pages, the code above is present.
I am looking to display all sub-menu items when the page loads with an indentation that reflects the menu hierarchy. Currently, the code only opens a sub-menu when its parent menu item is clicked (for example, clicking on Products shows its sub-menu).
Note: I can't attach an image as I'm new here, but I've described how I want the menu to look below.
Products
- Instock
- Out-of-Stock
Orders
- Purchase Orders
- Sales Orders
- Back Orders
- Invoiced Orders
Documents
- Purchase
- Invoice
Update 1: The current code does not show all menu items and sub-menu items when the page loads. I need to modify the asp:menu to include all menu items before applying CSS for the desired layout.
Update 2: This is the structure of the menu as seen in the page source: