SiteMapNodeItemEventArgsとは? わかりやすく解説

SiteMapNodeItemEventArgs クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

SiteMapPath.ItemCreated イベントと SiteMapPath.ItemDataBound イベントデータ提供します

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

Public Class SiteMapNodeItemEventArgs
    Inherits EventArgs
Dim instance As SiteMapNodeItemEventArgs
public class SiteMapNodeItemEventArgs : EventArgs
public ref class SiteMapNodeItemEventArgs :
 public EventArgs
public class SiteMapNodeItemEventArgs extends
 EventArgs
public class SiteMapNodeItemEventArgs extends
 EventArgs
解説解説

SiteMapPath.ItemCreated イベントは、SiteMapNodeItem が SiteMapPath コントロールによって作成されたときに発生しますSiteMapPath.ItemDataBound イベントは、SiteMapPath.CreateControlHierarchy の呼び出し時に DataBindアイテムに対して呼び出されたときに発生します

イベント処理詳細については、「イベント利用」を参照してください

.NET Framework のセキュリティ.NET Frameworkセキュリティ
継承階層継承階層
System.Object
   System.EventArgs
    System.Web.UI.WebControls.SiteMapNodeItemEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMapNodeItemEventArgs メンバ
System.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath
その他の技術情報
ASP.NET サイト ナビゲーション
SiteMapPath Web サーバー コントロール概要

SiteMapNodeItemEventArgs コンストラクタ

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定した SiteMapNodeItem オブジェクトイベントソースとして設定して、SiteMapNodeItemEventArgs クラス新しインスタンス初期化します。

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

Public Sub New ( _
    item As SiteMapNodeItem _
)
Dim item As SiteMapNodeItem

Dim instance As New SiteMapNodeItemEventArgs(item)
public SiteMapNodeItemEventArgs (
    SiteMapNodeItem item
)
public:
SiteMapNodeItemEventArgs (
    SiteMapNodeItem^ item
)
public SiteMapNodeItemEventArgs (
    SiteMapNodeItem item
)
public function SiteMapNodeItemEventArgs (
    item : SiteMapNodeItem
)

パラメータ

item

イベントソースである SiteMapNodeItem。

使用例使用例

PathSeparator を表す SiteMapNodeItem使用して SiteMapNodeItemEventArgs作成する方法、およびそのイベント引数を OnItemCreated メソッドに渡す方法次のコード例示します。このコード例は、SiteMapPath クラストピック取り上げているコード例一部分です。

Private Sub AddDropDownListAfterCurrentNode(item
 As SiteMapNodeItem)

   Dim childNodes As SiteMapNodeCollection
 = item.SiteMapNode.ChildNodes

   ' Only do this work if there are child nodes.
   If Not (childNodes Is
 Nothing) Then

      ' Add another PathSeparator after the CurrentNode.
      Dim finalSeparator As New
 SiteMapNodeItem(item.ItemIndex, SiteMapNodeItemType.PathSeparator)

      Dim eventArgs As New
 SiteMapNodeItemEventArgs(finalSeparator)

      InitializeItem(finalSeparator)
      ' Call OnItemCreated every time a SiteMapNodeItem is
      ' created and initialized.
      OnItemCreated(eventArgs)

      ' The pathSeparator does not bind to any SiteMapNode, so
      ' do not call DataBind on the SiteMapNodeItem.
      item.Controls.Add(finalSeparator)

      ' Create a DropDownList and populate it with the children of the
      ' CurrentNode. There are no styles or templates that are applied
      ' to the DropDownList control. If OnSelectedIndexChanged is raised
,
      ' the event handler redirects to the page selected.
      ' The CurrentNode has child nodes.
      Dim ddList As New
 DropDownList()
      ddList.AutoPostBack = True

      AddHandler ddList.SelectedIndexChanged, AddressOf
 Me.DropDownNavPathEventHandler

      ' Add a ListItem to the DropDownList for every node in the
      ' SiteMapNodes collection.
      Dim node As SiteMapNode
      For Each node In 
 childNodes
         ddList.Items.Add(New ListItem(node.Title, node.Url))
      Next node

      item.Controls.Add(ddList)
   End If
End Sub 'AddDropDownListAfterCurrentNode

private void AddDropDownListAfterCurrentNode(SiteMapNodeItem
 item) {

    SiteMapNodeCollection childNodes = item.SiteMapNode.ChildNodes;

    // Only do this work if there are child nodes.
    if (childNodes != null) {

        // Add another PathSeparator after the CurrentNode.
        SiteMapNodeItem finalSeparator =
            new SiteMapNodeItem(item.ItemIndex,
                                SiteMapNodeItemType.PathSeparator);

        SiteMapNodeItemEventArgs eventArgs =
            new SiteMapNodeItemEventArgs(finalSeparator);

        InitializeItem(finalSeparator);
        // Call OnItemCreated every time a SiteMapNodeItem is
        // created and initialized.
        OnItemCreated(eventArgs);

        // The pathSeparator does not bind to any SiteMapNode, so
        // do not call DataBind on the SiteMapNodeItem.
        item.Controls.Add(finalSeparator);

        // Create a DropDownList and populate it with the children of
 the
        // CurrentNode. There are no styles or templates that are applied
        // to the DropDownList control. If OnSelectedIndexChanged is
 raised,
        // the event handler redirects to the page selected.
        // The CurrentNode has child nodes.
        DropDownList ddList = new DropDownList();
        ddList.AutoPostBack = true;

        ddList.SelectedIndexChanged += new EventHandler(this.DropDownNavPathEventHandler);

        // Add a ListItem to the DropDownList for every node in the
        // SiteMapNodes collection.
        foreach (SiteMapNode node in childNodes)
 {
            ddList.Items.Add(new ListItem(node.Title, node.Url));
        }

        item.Controls.Add(ddList);
    }
}
private void AddDropDownListAfterCurrentNode(SiteMapNodeItem
 item)
{
    SiteMapNodeCollection childNodes = item.get_SiteMapNode().
        get_ChildNodes();
    // Only do this work if there are child nodes.
    if (childNodes != null) {
        // Add another PathSeparator after the CurrentNode.
        SiteMapNodeItem finalSeparator = new SiteMapNodeItem(item.
            get_ItemIndex(), SiteMapNodeItemType.PathSeparator);

        SiteMapNodeItemEventArgs eventArgs = new SiteMapNodeItemEventArgs(
            finalSeparator);

        InitializeItem(finalSeparator);
        // Call OnItemCreated every time a SiteMapNodeItem is
        // created and initialized.
        OnItemCreated(eventArgs);
        // The pathSeparator does not bind to any SiteMapNode, so 
        // do not call DataBind on the SiteMapNodeItem.
        item.get_Controls().Add(finalSeparator);
        // Create a DropDownList and populate it with the children of
 the 
        // CurrentNode. There are no styles or templates that are applied
        // to the DropDownList control. If OnSelectedIndexChanged is
 raised, 
        // the event handler redirects to the page selected.
        // The CurrentNode has child nodes.
        DropDownList ddList = new DropDownList();
        ddList.set_AutoPostBack(true);

        ddList.add_SelectedIndexChanged(new EventHandler(this.
            DropDownNavPathEventHandler));
        // Add a ListItem to the DropDownList for every node in the
        // SiteMapNodes collection.
        for (int iCtr = 0; iCtr < childNodes.get_Count();
 iCtr++) {
            SiteMapNode node = (SiteMapNode)childNodes.get_Item(iCtr);
            ddList.get_Items().Add(new ListItem(node.get_Title(),
 node.
                get_Url()));
        }

        item.get_Controls().Add(ddList);
    }
} //AddDropDownListAfterCurrentNode
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SiteMapNodeItemEventArgs クラス
SiteMapNodeItemEventArgs メンバ
System.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
その他の技術情報
ASP.NET サイト ナビゲーション

SiteMapNodeItemEventArgs プロパティ


パブリック プロパティパブリック プロパティ

参照参照

関連項目

SiteMapNodeItemEventArgs クラス
System.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath

その他の技術情報

ASP.NET サイト ナビゲーション
SiteMapPath Web サーバー コントロール概要

SiteMapNodeItemEventArgs メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SiteMapNodeItemEventArgs クラス
System.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath

その他の技術情報

ASP.NET サイト ナビゲーション
SiteMapPath Web サーバー コントロール概要

SiteMapNodeItemEventArgs メンバ

SiteMapPath.ItemCreated イベントと SiteMapPath.ItemDataBound イベントデータ提供します

SiteMapNodeItemEventArgs データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SiteMapNodeItemEventArgs 指定した SiteMapNodeItem オブジェクトイベントソースとして設定して、SiteMapNodeItemEventArgs クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SiteMapNodeItemEventArgs クラス
System.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath

その他の技術情報

ASP.NET サイト ナビゲーション
SiteMapPath Web サーバー コントロール概要



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

辞書ショートカット

すべての辞書の索引

「SiteMapNodeItemEventArgs」の関連用語

SiteMapNodeItemEventArgsのお隣キーワード
検索ランキング

   

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



SiteMapNodeItemEventArgsのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS