Using two web.sitemap file in a single project
There may be cases where we need to use different sitemaps in a single project. This can be done by adding the provider names in web.config file as follows.
<providers>
<add
name=”adminlinks”
type=”System.Web.XmlSiteMapProvider”
siteMapFile=”~/admin/admin.sitemap” />
<add
name=”userlinks”
type=”System.Web.XmlSiteMapProvider”
siteMapFile=”~/user/user.sitemap” />
</providers>
Then you can assign SiteMapProvider to SiteMapDataSource as following, and you can bind your Menu control or tree view control to different SiteMapDataSource.
<asp:SiteMapDataSource ID=”SiteMapDataSource1″ runat=”server” SiteMapProvider=”adminlinks” />
