System.Web.SiteMapProvider.FindSiteMapNode Method

Retrieves a System.Web.SiteMapNode object that represents the currently requested page using the specified System.Web.HttpContext object.

Syntax

public virtual SiteMapNode FindSiteMapNode (HttpContext context)

Parameters

context
The System.Web.HttpContext used to match node information with the URL of the requested page.

Returns

A System.Web.SiteMapNode that represents the currently requested page; otherwise, null, if no corresponding System.Web.SiteMapNode can be found in the System.Web.SiteMapNode or if the page context is null.

Remarks

The SiteMapProvider.FindSiteMapNode(HttpContext) method calls the abstract SiteMapProvider.FindSiteMapNode(string) method to retrieve a System.Web.SiteMapNode object for the currently requested page based on the raw URL or the virtual path of the request. If no corresponding System.Web.SiteMapNode is found in the System.Web.SiteMap, null is returned.

The erload:System.Web.SiteMapProvider.FindSiteMapNode method does not check whether a System.Web.SiteMapNode is accessible to a user, by default.

Requirements

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