SiteMapProvider.RootNode プロパティ
アセンブリ: System.Web (system.web.dll 内)

現在のサイト マップ データ プロバイダのルート SiteMapNode。既定の実装は、返されたノードに対してセキュリティ トリミングが実行されます。

既定の実装は、GetRootNodeCore 抽象メソッドを呼び出します。
継承時の注意 派生クラスで RootNode プロパティをオーバーライドする場合、実装がプロバイダ階層をナビゲートしてサイトの絶対ルート ノードを検索することがないようにしてください。

SiteMapProvider 抽象クラスを実装するクラスに RootNode プロパティを実装する方法を次のコード例に示します。
このコード例は、SiteMapProvider クラスのトピックで取り上げているコード例の一部分です。
' Implement the CurrentNode property. Public Overrides ReadOnly Property CurrentNode() As SiteMapNode Get Dim currentUrl As String = FindCurrentUrl() ' Find the SiteMapNode that represents the current page. Dim aCurrentNode As SiteMapNode = FindSiteMapNode(currentUrl) Return aCurrentNode End Get End Property ' Implement the RootNode property. Public Overrides ReadOnly Property RootNode() As SiteMapNode Get Return aRootNode End Get End Property
// Implement the CurrentNode property. public override SiteMapNode CurrentNode { get { string currentUrl = FindCurrentUrl(); // Find the SiteMapNode that represents the current page. SiteMapNode currentNode = FindSiteMapNode(currentUrl); return currentNode; } } // Implement the RootNode property. public override SiteMapNode RootNode { get { return rootNode; } }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- SiteMapProvider.RootNode プロパティのページへのリンク