Export (0) Print
Expand All

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.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public virtual void HintNeighborhoodNodes (
	SiteMapNode node,
	int upLevel,
	int downLevel
)
public void HintNeighborhoodNodes (
	SiteMapNode node, 
	int upLevel, 
	int downLevel
)
public function HintNeighborhoodNodes (
	node : SiteMapNode, 
	upLevel : int, 
	downLevel : int
)
Not applicable.

Parameters

node

The SiteMapNode that acts as a reference point for upLevel.

upLevel

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.

downLevel

The number of descendant SiteMapNode generations to fetch. 0 indicates no descendant nodes are retrieved and -1 indicates that all descendant nodes might be retrieved and cached.

Exception typeCondition

ArgumentOutOfRangeException

upLevel or downLevel is less than -1.

ArgumentNullException

node is a null reference (Nothing in Visual Basic).

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

Site map providers can override the HintNeighborhoodNodes 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 HintNeighborhoodNodes method, using the ParentNode and ChildNodes properties.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft