System.Web.SiteMap.RootNode Property

Gets a System.Web.SiteMapNode object that represents the top-level page of the navigation structure for the site.

Syntax

public static SiteMapNode RootNode { get; }

Value

Documentation for this section has not yet been entered.

Remarks

The System.Web.SiteMap class retrieves the SiteMap.RootNode property by requesting it from the provider. If there is a provider hierarchy, the System.Web.SiteMap class retrieves the root node of the root provider in the hierarchy. To access the root node of the default provider, call the SiteMap.Provider property, which retrieves both the default provider and its SiteMapProvider.RootNode property.

The System.Web.XmlSiteMapProvider object, which is the default provider for the System.Web.SiteMap class, supports only one XmlSiteMapProvider.RootNode.

If you implement your own System.Web.SiteMapProvider class and override the abstract SiteMapProvider.RootNode property, you must provide your own implementation to track the SiteMapProvider.RootNode property of the System.Web.SiteMapNode instance.

The root node must be visible to all users, by design. If the root node is not visible to all users when security trimming is enabled, accessing the SiteMap.RootNode property might result in an InvalidOperationException exception.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0