Added a menu control and selected new datasource: SiteMapDataSource1
Here is my Web.sitemap so far:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/Home.aspx" title="Home" description="Home Page">
<siteMapNode url="~/PostItem.aspx" title="Post Item" description="Post a new item" />
</siteMapNode>
</siteMap>
How can I add more root level items? I can create more siteMapNode’s within the root level one that’s already there, but if I add any outside of that it gives me an error. It makes sense to me why that would cause an error, but I’m thinking there’s obviously a way to get the menu to display multiple root level menu items… but how?
–Edit–
If you want to build the Menu control with a xml data set, then you can have multiple nodes at the root level. This can be done via the designer and specifying MenuItems in the Items set of the Menu control, you can also add MenuItems to the Items list in the code behind, or bind it to an xml data set.
The MSDN has more information regarding this control. Code Project has a tutorial on using the xml data to build the Menu control.
–Original–
Sorry, you cannot add more than one root level
siteMapNode. Typically you see that being the main entry point of the site (like you have it configured). Additional navigation is added from there.Take a look at the MSDN for more information.