Provides a method that site map providers can override to perform an optimized retrieval of one or more levels of parent and ancestor nodes, relative to the specified System.Web.SiteMapNode object.
- 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 might be retrieved and cached.
The default SiteMapProvider.HintAncestorNodes(SiteMapNode, int) method only checks for an upLevel parameter that is less than -1 and a node parameter that is null. Because the System.Web.XmlSiteMapProvider class caches site map information in memory, the SiteMapProvider.HintAncestorNodes(SiteMapNode, int) method is not used.
Site map providers can override the SiteMapProvider.HintAncestorNodes(SiteMapNode, int) method to perform an optimized retrieval of parent and ancestor nodes of the specified System.Web.SiteMapNode object.
The upLevel parameter is used to specify how many levels of parent and ancestor nodes to traverse from the specified System.Web.SiteMapNode. If fewer levels exist than are requested, all available ancestor nodes are returned within the specified bound. If preferred, the parent node can be linked to the specified System.Web.SiteMapNode using the SiteMapNode.ParentNode property.