StaticSiteMapProvider.GetChildNodes(SiteMapNode) 方法

定義

擷取特定 SiteMapNode 物件的子系網站導覽節點。Retrieves the child site map nodes of a specific SiteMapNode object.

public:
 override System::Web::SiteMapNodeCollection ^ GetChildNodes(System::Web::SiteMapNode ^ node);
public override System.Web.SiteMapNodeCollection GetChildNodes (System.Web.SiteMapNode node);
override this.GetChildNodes : System.Web.SiteMapNode -> System.Web.SiteMapNodeCollection
Public Overrides Function GetChildNodes (node As SiteMapNode) As SiteMapNodeCollection

參數

node
SiteMapNode

SiteMapNode,要擷取其所有子系網站導覽節點。The SiteMapNode for which to retrieve all child site map nodes.

傳回

SiteMapNodeCollection

唯讀 SiteMapNodeCollection,包含 node 的子系網站導覽節點。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.

例外狀況

nodenullnode is null.

備註

SiteMapNode物件會委派給網站地圖提供者,以追蹤其子系和父網站對應節點。The SiteMapNode objects delegate to the site map provider to keep track of their child and parent site map nodes. 因此,針對階層式網站地圖結構(例如)執行網站地圖提供者, StaticSiteMapProvider 並使用 SiteMapNode 物件來代表網站地圖節點的類別,必須追蹤所有網站地圖節點的階層式關聯性,才能流覽整個階層式樹狀結構。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.

GetChildNodes方法 BuildSiteMap 會在內部呼叫方法,以抓取 SiteMapNodeCollection 相對於指定網站地圖節點且與目前使用者相關之網站地圖節點的唯讀集合。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.

適用於

另請參閱