System.Web.SiteMapProvider.HintNeighborhoodNodes Method

Provides a method that site map providers can override to perform an optimized retrieval of nodes found in the proximity of the specified node.

Syntax

public virtual void HintNeighborhoodNodes (SiteMapNode node, int upLevel, int downLevel)

Parameters

node
The System.Web.SiteMapNode that acts as a reference point for upLevel.
upLevel
The number of ancestor System.Web.SiteMapNode generations to fetch. 0 indicates no ancestor nodes are retrieved and -1 indicates that all ancestors (and their descendant nodes to the level of node) might be retrieved and cached.
downLevel
The number of descendant System.Web.SiteMapNode generations to fetch. 0 indicates no descendant nodes are retrieved and -1 indicates that all descendant nodes might be retrieved and cached.

Remarks

The default SiteMapProvider.HintNeighborhoodNodes(SiteMapNode, int, int) method only checks for an upLevel and downLevel parameters that are less than -1 and a node parameter that is null. Because the System.Web.XmlSiteMapProvider object caches site map information in memory, the SiteMapProvider.HintNeighborhoodNodes(SiteMapNode, int, int) method is not used.

Site map providers can override the SiteMapProvider.HintNeighborhoodNodes(SiteMapNode, int, int) method to perform an optimized lookup of the System.Web.SiteMapNode objects in the proximity of the specified System.Web.SiteMapNode. The upLevel parameter is used to specify how many levels of parent and ancestor nodes to traverse from the specified System.Web.SiteMapNode. The downLevel parameter is used to specify how many levels of child nodes from the current node to retrieve. If preferred, the ancestor and descendant nodes can be linked to the System.Web.SiteMapNode that is returned by the SiteMapProvider.HintNeighborhoodNodes(SiteMapNode, int, int) method, using the SiteMapNode.ParentNode and SiteMapNode.ChildNodes properties.

Requirements

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