Wizard.SideBarButtonClick イベント
アセンブリ: System.Web (system.web.dll 内)

Dim instance As Wizard Dim handler As WizardNavigationEventHandler AddHandler instance.SideBarButtonClick, handler
public: virtual event WizardNavigationEventHandler^ SideBarButtonClick { void add (WizardNavigationEventHandler^ value); void remove (WizardNavigationEventHandler^ value); }

SideBarButtonClick イベントは、Wizard コントロールのサイドバー領域のボタンをクリックしたときに発生します。SideBarButtonClick イベントを使用して、サイドバー領域のボタンがクリックされたときに追加の処理を提供します。
![]() |
---|
CommandName プロパティが Move に設定された Button コントロールが、SideBarTemplate オブジェクトに関する DataList コントロールサイドバー リストの範囲外にある場合、SideBarButtonClick によりイベントは発生しません。 |

SideBarButtonClick イベントのイベント ハンドラを指定する方法を次のコード例に示します。SideBarButtonClick イベントが発生するたびに、Label1 のText プロパティにメッセージが書き込まれます。このメッセージには、クリックされたサイドバー領域に関する情報が含まれます。
<%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> Sub OnSideBarButtonClick(ByVal sender As Object, ByVal e As WizardNavigationEventArgs) ' When a button in the sidebar area is clicked, put a message ' in Label1 to be displayed in the header area. Dim tempLabel As Label = CType(Wizard1.FindControl("Label1"), Label) If Not tempLabel Is Nothing Then tempLabel.Text = "You clicked the button for Step " & _ (e.NextStepIndex + 1) & "." End If End Sub </script> <html > <body> <form id="form1" runat="server"> <asp:Wizard id="Wizard1" runat="server" onsidebarbuttonclick="OnSideBarButtonClick"> <WizardSteps> <asp:WizardStep id="WizardStep1" runat="server" title="Step 1"> </asp:WizardStep> <asp:WizardStep id="WizardStep2" runat="server" title="Step 2"> </asp:WizardStep> <asp:WizardStep id="WizardStep3" runat="server" title="Step 3"> </asp:WizardStep> </WizardSteps> <HeaderTemplate> <b>SideBarButtonClick Example</b> <br /> <asp:Label id="Label1" runat="server" width="208px" height="19px"> </asp:Label> </HeaderTemplate> </asp:Wizard> </form> </body> </html>
<%@ Page Language="C#" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> void OnSideBarButtonClick(object sender, WizardNavigationEventArgs e) { // When a button in the sidebar area is clicked, put a message // in Label1 to be displayed in the header area. Label tempLabel = (Label)Wizard1.FindControl("Label1"); if (tempLabel != null) { tempLabel.Text = "You clicked the button for Step " + (e.NextStepIndex + 1) + "."; } } </script> <html > <body> <form id="form1" runat="server"> <asp:Wizard id="Wizard1" runat="server" onsidebarbuttonclick="OnSideBarButtonClick"> <WizardSteps> <asp:WizardStep id="WizardStep1" runat="server" title="Step 1"> </asp:WizardStep> <asp:WizardStep id="WizardStep2" runat="server" title="Step 2"> </asp:WizardStep> <asp:WizardStep id="WizardStep3" runat="server" title="Step 3"> </asp:WizardStep> </WizardSteps> <HeaderTemplate> <b>SideBarButtonClick Example</b> <br /> <asp:Label id="Label1" runat="server" width="208px" height="19px"> </asp:Label> </HeaderTemplate> </asp:Wizard> </form> </body> </html>

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


Weblioに収録されているすべての辞書からWizard.SideBarButtonClick イベントを検索する場合は、下記のリンクをクリックしてください。

- Wizard.SideBarButtonClick イベントのページへのリンク