System.Web.StaticSiteMapProvider.FindSiteMapNode Method

Retrieves a System.Web.SiteMapNode object that represents the page at the specified URL.

Syntax

public override SiteMapNode FindSiteMapNode (string rawUrl)

Parameters

rawUrl
A URL that identifies the page for which to retrieve a System.Web.SiteMapNode.

Returns

A System.Web.SiteMapNode that represents the page identified by rawURL; otherwise, null, if no corresponding site map node is found.

Remarks

The provided URL is typically a virtual or absolute URL. It can also be a URL that uses ASP.NET application-relative syntax, such as "~/apprelativedirectory". The System.Web.StaticSiteMapProvider class automatically normalizes application-relative raw URLs to an absolute virtual path.

The System.Web.XmlSiteMapProvider object, which is derived from the System.Web.StaticSiteMapProvider and is the default site map provider for ASP.NET, uses the SiteMapNode.Url property of a System.Web.SiteMapNode object as a lookup key in its internal collections, by default. If the SiteMapNode.Url property of the System.Web.SiteMapNode is set, it must be unique within the scope of the site map provider. The StaticSiteMapProvider.FindSiteMapNode(string) method attempts to retrieve site map nodes based on their SiteMapNode.Url. Otherwise, you can use the SiteMapNode.Key property and the corresponding StaticSiteMapProvider.FindSiteMapNodeFromKey(string) method to retrieve site map nodes. If no SiteMapNode.Url or SiteMapNode.Key is specified, the site map provider automatically generates a SiteMapNode.Key property to track the site map nodes.

Requirements

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