Provides an optimized lookup method for site map providers when retrieving an ancestor node for the specified System.Web.SiteMapNode object and fetching its child nodes.
- node
- The System.Web.SiteMapNode that acts as a reference point for walkupLevels and relativeDepthFromWalkup.
- walkupLevels
- The number of ancestor node levels to traverse when retrieving the requested ancestor node.
- relativeDepthFromWalkup
- The number of descendant node levels to retrieve from the target ancestor node.
A System.Web.SiteMapNode that represents an ancestor of node; otherwise, null, if the current or ancestor System.Web.SiteMapNode is not found or cannot be returned for the current user.
The default implementation of the System.Web.SiteMapProvider class provides a non-optimized implementation of the SiteMapProvider.GetParentNodeRelativeToNodeAndHintDownFromParent(SiteMapNode, int, int) method, calling the SiteMapProvider.HintAncestorNodes(SiteMapNode, int) and SiteMapProvider.HintNeighborhoodNodes(SiteMapNode, int, int) methods; however, site map providers can override the SiteMapProvider.GetParentNodeRelativeToNodeAndHintDownFromParent(SiteMapNode, int, int) method and provide an optimized implementation that uses custom caching mechanisms to return the ancestor node and perform an optimized lookup of the other System.Web.SiteMapNode objects. The SiteMapProvider.GetParentNodeRelativeToNodeAndHintDownFromParent(SiteMapNode, int, int) method is very similar to the SiteMapProvider.GetParentNodeRelativeToCurrentNodeAndHintDownFromParent(int, int) method.
The walkupLevels parameter is used to specify how many levels of parent and ancestor nodes to traverse when retrieving the target node. If fewer levels exist than are requested, null is returned. The downLevel parameter is used to specify how many levels of descendant nodes from the target ancestor node to retrieve. If preferred, the ancestor and descendant nodes can be linked to the System.Web.SiteMapNode that is returned by the SiteMapProvider.GetParentNodeRelativeToNodeAndHintDownFromParent(SiteMapNode, int, int) method, using the SiteMapNode.ParentNode and SiteMapNode.ChildNodes properties. If there are fewer ancestor node levels than specified by the upLevel parameter, null is returned. It is up to the provider implementer to decide how to handle the situation where the number of available descendant node levels is less than the value that is specified by the downLevel parameter.