BulletedList.OnClick メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > BulletedList.OnClick メソッドの意味・解説 

BulletedList.OnClick メソッド

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

BulletedList コントロールClick イベント発生させます

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

Protected Overridable Sub
 OnClick ( _
    e As BulletedListEventArgs _
)
Dim e As BulletedListEventArgs

Me.OnClick(e)
protected virtual void OnClick (
    BulletedListEventArgs e
)
protected:
virtual void OnClick (
    BulletedListEventArgs^ e
)
protected void OnClick (
    BulletedListEventArgs e
)
protected function OnClick (
    e : BulletedListEventArgs
)

パラメータ

e

イベント データ格納している BulletedListEventArgs。

解説解説
使用例使用例

BulletedList コントロールClick イベントイベント ハンドラ指定およびコード化する方法次のコード例示しますリスト項目がクリックされると、メッセージページLabel コントロール表示されます。

<%@ Page Language="VB" %>

<html>
<head>

    <script runat="server">

        Sub ItemsBulletedList_Click(ByVal sender
 As Object, ByVal e As
 System.Web.UI.WebControls.BulletedListEventArgs)
            ' Change the message displayed in the label based on the
 index
            ' of the list item that was clicked.
            Select Case (e.Index)
                Case 0
                    Message.Text = "You clicked list item 1."
                Case 1
                    Message.Text = "You clicked list item 2."
                Case 2
                    Message.Text = "You clicked list item 3."
                Case Else
                    Throw New Exception("You
 did not click a valid list item.")
            End Select

        End Sub

    </script>

</head>
<body>

    <h3>BulletedList Click Example</h3>

    <form ID="Form1" runat="server">
            
        <P>Click on an item in the list
 to raise the Click event.</p> 
        
        <asp:BulletedList id="ItemsBulletedList"
 
            BulletStyle="Disc"
        DisplayMode="LinkButton" 
        OnClick="ItemsBulletedList_Click"
        runat="server">    
            <asp:ListItem Value="http://www.cohowinery.com">Coho
 Winery</asp:ListItem>
        <asp:ListItem Value="http://www.contoso.com">Contoso,
 Ltd.</asp:ListItem>
        <asp:ListItem Value="http://www.tailspintoys.com">Tailspin
 Toys</asp:ListItem>
    </asp:BulletedList>
            
    <asp:Label id="Message" 
        Font-Size="12"
        Width="168px" 
        Font-Bold="True" 
        runat="server"/>
              
   </form>

</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

BulletedList.OnClick メソッドのお隣キーワード
検索ランキング

   

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



BulletedList.OnClick メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS