You can use more than one sitemap file and decide which one to bind to a control. Follow these steps to bind a control like the Menu Control, to multiple ASP.NET Site Map files. Here I am assuming that you have two SiteMap files – Web.sitemap and Web2.sitemap
1. Define an entry in the web.config as following to make use of the siteMap element:
2. Now assuming your Menu control is bound to the SiteMapDataSource in the following way:
3. Now just set the SiteMapProvider property of the SiteMapDataSource to the provider's name from the web.config file, as shown below:
SiteMap1.SiteMapProvider = "providertwo";
That’s it! Your menu control will be bound to the providertwo now.
Giving me +1 tells me you liked this article! Thanks in advance
Did you like this post?
|Save on Delicious|
|subscribe via rss||subscribe via e-mail|
|print this post||follow me on twitter|