温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
[1] 温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
[2] 温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
[3] 温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
[4] 温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
[2] 温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
[3] 温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
[4] 温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
系列文章导航:
温故知新ASP.NET 2.0(C#)(1) - MasterPage(母版页)
温故知新ASP.NET 2.0(C#)(1) - MasterPage(母版页)
温故知新ASP.NET 2.0(C#)(2) - Themes(主题)
温故知新ASP.NET 2.0(C#)(3) - SiteMap(站点地图)
温故知新ASP.NET 2.0(C#)(4) - 缓存&SqlCacheDependency
温故知新ASP.NET 2.0(C#)(5) - Localization
温故知新ASP.NET 2.0(C#)(8) - DataSourceControl
温故知新ASP.NET 2.0(C#)(6) - Membership&RoleManager
温故知新ASP.NET 2.0(C#)(7) - Profile
温故知新ASP.NET 2.0(C#)(8) - DataSourceControl
上面两个测试页面所需的web.config中的配置
<configuration>
<appSettings/>
<connectionStrings>
<add name="SqlConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"/>
</connectionStrings>
<system.web>
<siteMap enabled="true" defaultProvider="XmlSiteMapProvider">
<providers>
<add name="XmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="~/Web.sitemap"/>
<add name="XmlSiteMapProviderTest" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="~/Sitemap/Web.sitemap"/>
<add name="SqlSiteMapProvider" type="SqlSiteMapProvider" connectionStringName="SqlConnectionString" />
</providers>
</siteMap>
</system.web>
</configuration>
<appSettings/>
<connectionStrings>
<add name="SqlConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database.mdf;Integrated Security=True;User Instance=True"/>
</connectionStrings>
<system.web>
<siteMap enabled="true" defaultProvider="XmlSiteMapProvider">
<providers>
<add name="XmlSiteMapProvider" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="~/Web.sitemap"/>
<add name="XmlSiteMapProviderTest" type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="~/Sitemap/Web.sitemap"/>
<add name="SqlSiteMapProvider" type="SqlSiteMapProvider" connectionStringName="SqlConnectionString" />
</providers>
</siteMap>
</system.web>
</configuration>