SiteMapDataSource::SiteMapProvider Property
Updated: October 2009
Gets or sets the name of the site map provider that the data source binds to.
Assembly: System.Web (in System.Web.dll)
public: virtual property String^ SiteMapProvider { String^ get (); void set (String^ value); }
<asp:SiteMapDataSource SiteMapProvider="String" />
Property Value
Type: System::StringThe name of the site map provider that the SiteMapDataSource binds to. By default, the value is Empty, and the default site map provider for the site is used.
The value of the SiteMapProvider property is stored in view state.
| Topic | Location |
|---|---|
| How to: Localize Site-Map Data | Building ASP .NET Web Applications |
| How to: Localize Site-Map Data | Building ASP .NET Web Applications |
The following code example demonstrates how to declaratively bind a TreeView control to site map data that is provided by an SiteMapProvider object other than the default provider. The site is configured to access a custom SiteMapProvider object though the following Web.config file:
<system.web>
<siteMap>
<providers>
<add name="AsciiTextProvider"
description="SiteMap provider which reads in .sitemap text files."
type="Samples.AspNet.SimpleTextSiteMapProvider,Samples.AspNet"
siteMapFile="test.txt"/>
</providers>
</siteMap>
</system.web>
Note: |
|---|
The AsciiTextProvider provider is not the default provider for the site, which (in this case) remains the XmlSiteMapProvider object. The SiteMapProvider property of the SiteMapDataSource control is set to the name of a custom site map provider, and the TreeView binds to the corresponding site map data. |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: