SiteMapNodeItemEventArgs クラス
アセンブリ: System.Web (system.web.dll 内)


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


System.EventArgs
System.Web.UI.WebControls.SiteMapNodeItemEventArgs


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SiteMapNodeItemEventArgs メンバ
System.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath
その他の技術情報
ASP.NET サイト ナビゲーション
SiteMapPath Web サーバー コントロールの概要
SiteMapNodeItemEventArgs コンストラクタ
アセンブリ: System.Web (system.web.dll 内)


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

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


SiteMapNodeItemEventArgs プロパティ


関連項目
SiteMapNodeItemEventArgs クラスSystem.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath
その他の技術情報
ASP.NET サイト ナビゲーションSiteMapPath Web サーバー コントロールの概要
SiteMapNodeItemEventArgs メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

関連項目
SiteMapNodeItemEventArgs クラスSystem.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath
その他の技術情報
ASP.NET サイト ナビゲーションSiteMapPath Web サーバー コントロールの概要
SiteMapNodeItemEventArgs メンバ
SiteMapPath.ItemCreated イベントと SiteMapPath.ItemDataBound イベントのデータを提供します。
SiteMapNodeItemEventArgs データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | SiteMapNodeItemEventArgs | 指定した SiteMapNodeItem オブジェクトをイベントのソースとして設定して、SiteMapNodeItemEventArgs クラスの新しいインスタンスを初期化します。 |


名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

関連項目
SiteMapNodeItemEventArgs クラスSystem.Web.UI.WebControls 名前空間
SiteMapNodeItem クラス
SiteMapNodeItemEventHandler
SiteMapPath
その他の技術情報
ASP.NET サイト ナビゲーションSiteMapPath Web サーバー コントロールの概要
- SiteMapNodeItemEventArgsのページへのリンク