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

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

SiteMap.CurrentNode プロパティ

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

現在要求されているページを表す SiteMapNode コントロール取得します

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

Public Shared ReadOnly Property
 CurrentNode As SiteMapNode
Dim value As SiteMapNode

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

プロパティ
現在要求されているページを表す SiteMapNode インスタンスサイト マップ情報表示するノードない場合null 参照 (Visual Basic では Nothing)。

例外例外
例外種類条件

InvalidOperationException

このサイト マップ機能無効になっています。

ConfigurationErrorsException

構成指定されている既定プロバイダ存在しません。

HttpException

この機能は、信頼性が低以上の場合にのみサポートされます。

解説解説
使用例使用例

CurrentNode プロパティ使用して現在のページを表す SiteMapNode オブジェクト取得する方法コード例次に示します

<Script runat="server">

Private Sub Page_Load(sender As
 Object, e As EventArgs)

    ' Examine the CurrentNode, and navigate the SiteMap relative to
 it.
    Response.Write(SiteMap.CurrentNode.Title & "<BR>")
    Response.Write("<FONT COLOR='red'>" & SiteMap.CurrentNode.Url
 & "</FONT><BR>")

    ' What nodes are children of the CurrentNode?
    If (SiteMap.CurrentNode.HasChildNodes) Then
        Dim ChildNodesEnumerator As IEnumerator
 = SiteMap.CurrentNode.ChildNodes.GetEnumerator()
        While (ChildNodesEnumerator.MoveNext())
            ' Prints the Title of each node.
            Response.Write(ChildNodesEnumerator.Current.ToString() & "<BR>")
        End While
    End If
    Response.Write("<HR>")

    ' Examine the RootNode, and navigate the SiteMap relative to it.
    Response.Write(SiteMap.RootNode.Title & "<BR>")
    Response.Write(SiteMap.RootNode.Url & "<BR>")

    ' What nodes are children of the RootNode?
    If (SiteMap.RootNode.HasChildNodes) Then
        Dim RootNodesChildrenEnumerator As
 IEnumerator = SiteMap.RootNode.ChildNodes.GetEnumerator()
        While (RootNodesChildrenEnumerator.MoveNext())
            ' Prints the Title of each node.
            Response.Write(RootNodesChildrenEnumerator.Current.ToString() & "<BR>")
        End While
    End If

End Sub ' Page_Load
</Script>
<Script runat="server">
private void Page_Load(object sender, System.EventArgs
 e)
{
    // Examine the CurrentNode, and navigate the SiteMap relative to
 it.
    Response.Write(SiteMap.CurrentNode.Title + "<BR>");
    Response.Write("<FONT COLOR='red'>" + SiteMap.CurrentNode.Url
 + "</FONT><BR>");

    // What nodes are children of the CurrentNode?
    if (SiteMap.CurrentNode.HasChildNodes) {
        IEnumerator childNodesEnumerator = SiteMap.CurrentNode.ChildNodes.GetEnumerator();
        while (childNodesEnumerator.MoveNext()) {
            // Prints the Title of each node.
            Response.Write(childNodesEnumerator.Current.ToString() + "<BR>");
        }
    }
    Response.Write("<HR>");

    // Examine the RootNode, and navigate the SiteMap relative to it.
    Response.Write(SiteMap.RootNode.Title + "<BR>");
    Response.Write(SiteMap.RootNode.Url + "<BR>");

    // What nodes are children of the RootNode?
    if (SiteMap.RootNode.HasChildNodes) {
        IEnumerator rootNodesChildrenEnumerator = SiteMap.RootNode.ChildNodes.GetEnumerator();
        while (rootNodesChildrenEnumerator.MoveNext()) {
            // Prints the Title of each node.
            Response.Write(rootNodesChildrenEnumerator.Current.ToString() + "<BR>");
        }
    }
}
</Script>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMap クラス
SiteMap メンバ
System.Web 名前空間
SiteMapProvider.CurrentNode
SiteMapResolve


このページでは「.NET Framework クラス ライブラリ リファレンス」からSiteMap.CurrentNode プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からSiteMap.CurrentNode プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からSiteMap.CurrentNode プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

「SiteMap.CurrentNode プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS