StaticSiteMapProvider.GetChildNodes(SiteMapNode) Method

Definition

Retrieves the child site map nodes of a specific SiteMapNode object.

public override System.Web.SiteMapNodeCollection GetChildNodes (System.Web.SiteMapNode node);

Parameters

node
SiteMapNode

The SiteMapNode for which to retrieve all child site map nodes.

Returns

A read-only SiteMapNodeCollection that contains the child site map nodes of node. If security trimming is enabled, the collection contains only site map nodes that the user is permitted to see.

Exceptions

node is null.

Remarks

The SiteMapNode objects delegate to the site map provider to keep track of their child and parent site map nodes. As a result, classes that implement a site map provider for a hierarchical site map structure, such as StaticSiteMapProvider, and use SiteMapNode objects to represent site map nodes, must track the hierarchical relationships of all site map nodes in order to be able to navigate an entire hierarchical tree.

The GetChildNodes method calls the BuildSiteMap method internally to retrieve read-only SiteMapNodeCollection collection of site map nodes that are relative to the specified site map node and relevant to the current user.

Applies to

Produto Versões
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also