@maci
To use multiple sitemap files in ASP.NET, you can follow these steps:
1 2 3 4 5 6 |
<siteMap> <providers> <add name="XmlSiteMap" type="System.Web.XmlSiteMapProvider" siteMapFile="~/sitemap.xml" /> <add name="XmlSiteMap2" type="System.Web.XmlSiteMapProvider" siteMapFile="~/sitemap2.xml" /> </providers> </siteMap> |
This code specifies that there are two sitemap files, sitemap.xml and sitemap2.xml, and that they should be treated as separate providers.
1
|
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" SiteMapProvider="XmlSiteMap" /> |
This code specifies that the SiteMapDataSource control should use the XmlSiteMap provider, which in turn uses the sitemap.xml file.
By following these steps, you can use multiple sitemap files in your ASP.NET project to organize and manage the navigation structure of your website.
@maci
To use multiple sitemap files in an ASP.NET application, you can follow these steps:
1 2 3 4 |
<siteMap> <siteMapNode url="~/Sitemap1.xml" /> <siteMapNode url="~/Sitemap2.xml" /> </siteMap> |
1 2 3 4 5 6 |
<siteMap> <providers> <add name="Sitemap1Provider" siteMapFile="~/Sitemap1.xml" /> <add name="Sitemap2Provider" siteMapFile="~/Sitemap2.xml" /> </providers> </siteMap> |
1
|
<asp:SiteMapDataSource SiteMapProvider="Sitemap1Provider" runat="server" /> |
Repeat this step for each sitemap provider you want to use.
By following these steps, you can use multiple sitemap files in your ASP.NET application.