Wizard.SideBarButtonClick イベントとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > Wizard.SideBarButtonClick イベントの意味・解説 

Wizard.SideBarButtonClick イベント

メモ : このイベントは、.NET Framework version 2.0新しく追加されたものです。

サイドバー領域ボタンクリックされたときに発生します

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

Public Event SideBarButtonClick As
 WizardNavigationEventHandler
Dim instance As Wizard
Dim handler As WizardNavigationEventHandler

AddHandler instance.SideBarButtonClick, handler
public virtual event WizardNavigationEventHandler SideBarButtonClick
public:
virtual event WizardNavigationEventHandler^ SideBarButtonClick {
    void add (WizardNavigationEventHandler^ value);
    void remove (WizardNavigationEventHandler^ value);
}
/** @event */
public void add_SideBarButtonClick (WizardNavigationEventHandler
 value)

/** @event */
public void remove_SideBarButtonClick (WizardNavigationEventHandler
 value)
JScript では、イベント使用できますが、新規に宣言することはできません。
解説解説

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>
          &nbsp;<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>
          &nbsp;<br />
          <asp:Label id="Label1" 
            runat="server" 
            width="208px" 
            height="19px">
          </asp:Label>
        </HeaderTemplate>
      </asp:Wizard>
    </form>
  </body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

Wizard.SideBarButtonClick イベントのお隣キーワード
検索ランキング

   

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



Wizard.SideBarButtonClick イベントのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS