System.Web.SiteMapProvider.FindSiteMapNode Method

When overridden in a derived class, retrieves a System.Web.SiteMapNode object that represents the page at the specified URL.

Syntax

public abstract 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 System.Web.SiteMapNode is found or if security trimming is enabled and the System.Web.SiteMapNode cannot be returned for the current user.

Remarks

Classes that derive from the System.Web.SiteMapProvider class must implement the abstract SiteMapProvider.FindSiteMapNode(string) method.

The URL provided can be a virtual or absolute URL. It might also be a URL that uses application-relative syntax, such as ~/apprelativedirectory. Ensure that any implementation of the SiteMapProvider.FindSiteMapNode(string) method parse and handle application-relative syntax properly.

The System.Web.XmlSiteMapProvider class, which is the default site map provider for ASP.NET, uses the URL of a System.Web.SiteMapNode object as a key in the various collections that the classes maintain. Therefore, if a System.Web.SiteMapNode provides a URL, it must be unique within the scope of the site map provider. If no URL is provided, a unique identifier is generated to identify the System.Web.SiteMapNode.

Requirements

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