Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Web.Sitemaps for 2 menus controls

Status
Not open for further replies.

altabear

Programmer
Apr 14, 2011
2
CA
I have an asp.net 3.5 web application, and need to have more than one web.sitemap.

As mentioned in this previous thread (now closed):

I have made two uniquely named sitemaps, and referenced them in the web.config:


<siteMap defaultProvider="mainMenuUpperProvider">
<providers>
<add name="mainMenuUpperProvider" type="System.Web.XmlSiteMapProvider" siteMapFile="~/mainMenuUpper.sitemap" />
<add name="mainMenuLowerProvider" type="System.Web.XmlSiteMapProvider" siteMapFile="~/mainMenuLower.sitemap" />
</providers>
</siteMap>


Right now, both menus are showing content from the "defaultProvider". I need one to show from the mainMenuLowerProvider sitemap.

What would you suggest as the best way to accomplish this?

thanks in advance for your assistance,

David
 
I discovered the answer. On the page in question, just put this line on the SiteMapDataSource for the 2nd menu:

SiteMapProvider="nameOfTheOtherProvider"

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top