Provides a method that site map providers can override to perform an optimized retrieval of nodes found in the proximity of the specified node.
Assembly: System.Web (in System.Web.dll)
public virtual void HintNeighborhoodNodes( SiteMapNode node, int upLevel, int downLevel )
- Type: System.Int32
The number of ancestor 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.
The default method only checks for an upLevel and downLevel parameters that are less than -1 and a node parameter that is null. Because the XmlSiteMapProvider object caches site map information in memory, the method is not used.
Site map providers can override the method to perform an optimized lookup of the SiteMapNode objects in the proximity of the specified SiteMapNode. The upLevel parameter is used to specify how many levels of parent and ancestor nodes to traverse from the specified 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 SiteMapNode that is returned by the method, using the ParentNode and ChildNodes properties.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.