Provides an optimized lookup method for site map providers when retrieving the node for the currently requested page and fetching the parent and ancestor site map nodes for the current page.
A System.Web.SiteMapNode that represents the currently requested page; otherwise, null, if the System.Web.SiteMapNode is not found or cannot be returned for the current user.
The default implementation of the SiteMapProvider.GetCurrentNodeAndHintAncestorNodes(int) method returns the SiteMapProvider.CurrentNode property; however, site map providers can override the SiteMapProvider.GetCurrentNodeAndHintAncestorNodes(int) method and provide an optimized implementation that uses custom caching mechanisms to return the current System.Web.SiteMapNode, as well as the parent and ancestor nodes of the parent.
The upLevel parameter is used to specify how many levels of parent and ancestor nodes to retrieve. If preferred, the parent and ancestor nodes can be linked to the System.Web.SiteMapNode object that is returned by the SiteMapProvider.GetCurrentNodeAndHintAncestorNodes(int) method, using the SiteMapNode.ParentNode property.
The System.Web.XmlSiteMapProvider class, which is the default site map provider for ASP.NET, caches the entire site map in memory, which results in little or no overhead when querying the System.Web.XmlSiteMapProvider for specific System.Web.SiteMapNode objects.