如何在一个站点里定义多个sitemap---针对asp.net2.0
时间:2010-11-20 来源:OnRush
假设我们站点下有2个sitemap文件:web.sitemap , left.sitemap
在web.config里如下设定:
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true"> <providers> <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/> <add name="left" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="left.sitemap" securityTrimmingEnabled="true"/> </providers> </siteMap>
设计时,在SiteMapDataSource1属性窗口的SiteMapProvider 里填 left 即可
相关阅读 更多 +