SiteMap.Provider Property

Gets the default SiteMapProvider object for the current site map.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public:
static property SiteMapProvider^ Provider {
	SiteMapProvider^ get ();
}
/** @property */
public static SiteMapProvider get_Provider ()

public static function get Provider () : SiteMapProvider

Not applicable.

Property Value

The default site map provider for the SiteMap.

Exception typeCondition

InvalidOperationException

The site map feature is not enabled.

ConfigurationErrorsException

The default provider specified in the configuration does not exist.

HttpException

The feature is supported only when running in Low trust or higher.

By default, the XmlSiteMapProvider object is used and site navigation data is loaded from the Web.sitemap file that is located in the root directory of the site. This is identified in the management classes that manage the site navigation configuration and the site map configuration section of the Web.config files. By default, it is an instance of the XmlSiteMapProvider class, which uses the Web.sitemap file as its persistent store. However, you can implement your own site map storage and configuration scheme by writing a class that implements the abstract SiteMapProvider class. For more information on writing your own provider, see SiteMapProvider.

The following code example demonstrates how to access the default SiteMapProvider object for the site by using the static Provider property.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: