SiteMapProvider.CurrentNode プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > SiteMapProvider.CurrentNode プロパティの意味・解説 

SiteMapProvider.CurrentNode プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

現在要求されているページを表す SiteMapNode オブジェクト取得します

名前空間: System.Web
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Overridable ReadOnly
 Property CurrentNode As SiteMapNode
Dim instance As SiteMapProvider
Dim value As SiteMapNode

value = instance.CurrentNode
public virtual SiteMapNode CurrentNode { get;
 }
public:
virtual property SiteMapNode^ CurrentNode {
    SiteMapNode^ get ();
}
/** @property */
public SiteMapNode get_CurrentNode ()
public function get CurrentNode
 () : SiteMapNode

プロパティ
現在要求されているページを表す SiteMapNodeSiteMapNode見つからなかった場合、または見つかった現在のユーザー返すことができない場合null 参照 (Visual Basic では Nothing)。

解説解説

SiteMapNode オブジェクト取得しようとする前に、SiteMapResolve イベント発生しイベントのサブスクライバが SiteMapNode クラスインスタンス返すことができるようにします。イベントのサブスクライバがない場合、SiteMapProvider クラス現在の HTTP コンテキスト使用して FindSiteMapNode メソッド呼び出し、現在要求されているページを表す SiteMapNode取得します

現在要求されているページSiteMapNode対応してない場合は、null 参照 (Visual Basic では Nothing) が返されます。セキュリティ トリミングが有効で、ユーザーSiteMapNode へのアクセス許可ない場合は、null 参照 (Visual Basic では Nothing) が返されます。

使用例使用例

SiteMapProvider 抽象クラス実装するクラスCurrentNode プロパティ実装する方法次のコード例示します

このコード例は、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;
  }
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMapProvider クラス
SiteMapProvider メンバ
System.Web 名前空間
RootNode
SecurityTrimmingEnabled



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

SiteMapProvider.CurrentNode プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SiteMapProvider.CurrentNode プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS