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

ListCommandEventArgs クラス

List コントロールの ItemCommand イベントのデータを提供します。

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

Public Class ListCommandEventArgs
    Inherits CommandEventArgs
Dim instance As ListCommandEventArgs
public class ListCommandEventArgs : CommandEventArgs
public ref class ListCommandEventArgs : public
 CommandEventArgs
public class ListCommandEventArgs extends CommandEventArgs
public class ListCommandEventArgs extends
 CommandEventArgs
使用例使用例

ListCommandEventArgs オブジェクトを使用して、項目がクリックされたときにリスト内のタスクのステータスを変更する方法を次のコード例に示します。このコード例は、List の概要で取り上げているコード例の一部です。

メモメモ

次のコード サンプルはシングルファイル コード モデルを使用しており、分離コード ファイルに直接コピーされた場合は正常に動作しない可能性があります。このコード サンプルは、拡張子が .aspx の空のテキスト ファイルにコピーする必要があります。詳細については、「ASP.NET Web ページのコード モデル」を参照してください。

Private Sub Status_ItemCommand(ByVal
 sender As Object, _
    ByVal e As ListCommandEventArgs)

    Const spec As String
 = "You now have {0} tasks done, {1} " & _
        "tasks scheduled, and {2} tasks pending."

    ' Move selection to next status toward 'done'
    Select Case e.ListItem.Value
        Case "scheduled"
            schedCount -= 1
            pendCount += 1
            e.ListItem.Value = "pending"
        Case "pending"
            pendCount -= 1
            doneCount += 1
            e.ListItem.Value = "done"
            
    End Select

    ' Show the status of the current task
    Label1.Text = e.ListItem.Text & " is " &
 _
        e.ListItem.Value

    ' Show current selection counts
    Label2.Text = String.Format(spec, doneCount, _
        schedCount, pendCount)
End Sub
Private Sub Status_ItemCommand(ByVal sender As Object, _
    ByVal e As ListCommandEventArgs)

    Const spec As String = "You now have {0} tasks done, {1} " & _
        "tasks scheduled, and {2} tasks pending."

    ' Move selection to next status toward 'done'
    Select Case e.ListItem.Value
        Case "scheduled"
            schedCount -= 1
            pendCount += 1
            e.ListItem.Value = "pending"
        Case "pending"
            pendCount -= 1
            doneCount += 1
            e.ListItem.Value = "done"
            
    End Select

    ' Show the status of the current task
    Label1.Text = e.ListItem.Text & " is " & _
        e.ListItem.Value

    ' Show current selection counts
    Label2.Text = String.Format(spec, doneCount, _
        schedCount, pendCount)
End Sub
.NET Framework のセキュリティ.NET Framework のセキュリティ
継承階層継承階層
System.Object
   System.EventArgs
     System.Web.UI.WebControls.CommandEventArgs
      System.Web.UI.MobileControls.ListCommandEventArgs
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ListCommandEventArgs コンストラクタ (MobileListItem, Object)

指定した ListItem と CommandSource を使用して、ListCommandEventArgs クラスの新しいインスタンスを初期化します。

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

Public Sub New ( _
    item As MobileListItem, _
    commandSource As Object _
)
Dim item As MobileListItem
Dim commandSource As Object

Dim instance As New ListCommandEventArgs(item,
 commandSource)
public ListCommandEventArgs (
    MobileListItem item,
    Object commandSource
)
public:
ListCommandEventArgs (
    MobileListItem^ item, 
    Object^ commandSource
)
public ListCommandEventArgs (
    MobileListItem item, 
    Object commandSource
)
public function ListCommandEventArgs (
    item : MobileListItem, 
    commandSource : Object
)

パラメータ

item

ListItem プロパティを初期化します。

commandSource

CommandSource プロパティを初期化します。

解説解説

ListItem プロパティと CommandSource プロパティは、item パラメータと commandSource パラメータの値でそれぞれ初期化されます。

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照

ListCommandEventArgs コンストラクタ

ListCommandEventArgs クラスの新しいインスタンスを初期化します。 ItemCommand デザイナでの ASP.NET モバイル コントロールの使用
オーバーロードの一覧オーバーロードの一覧

名前 説明
ListCommandEventArgs (MobileListItem, Object) 指定した ListItem と CommandSource を使用して、ListCommandEventArgs クラスの新しいインスタンスを初期化します。
ListCommandEventArgs (MobileListItem, Object, CommandEventArgs) 指定した ListItem、CommandSource、および元のコマンド引数を使用して、ListCommandEventArgs クラスの新しいインスタンスを初期化します。
参照参照

関連項目

ListCommandEventArgs クラス
ListCommandEventArgs メンバ
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロールの使用
デザイナでの ASP.NET モバイル コントロールの使用

ListCommandEventArgs コンストラクタ (MobileListItem, Object, CommandEventArgs)

指定した ListItem、CommandSource、および元のコマンド引数を使用して、ListCommandEventArgs クラスの新しいインスタンスを初期化します。

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

Public Sub New ( _
    item As MobileListItem, _
    commandSource As Object, _
    originalArgs As CommandEventArgs _
)
Dim item As MobileListItem
Dim commandSource As Object
Dim originalArgs As CommandEventArgs

Dim instance As New ListCommandEventArgs(item,
 commandSource, originalArgs)
public ListCommandEventArgs (
    MobileListItem item,
    Object commandSource,
    CommandEventArgs originalArgs
)
public:
ListCommandEventArgs (
    MobileListItem^ item, 
    Object^ commandSource, 
    CommandEventArgs^ originalArgs
)
public ListCommandEventArgs (
    MobileListItem item, 
    Object commandSource, 
    CommandEventArgs originalArgs
)
public function ListCommandEventArgs (
    item : MobileListItem, 
    commandSource : Object, 
    originalArgs : CommandEventArgs
)

パラメータ

item

ListItem プロパティを初期化します。

commandSource

CommandSource プロパティを初期化します。

originalArgs

CommandEventArgs オブジェクトから継承された元の引数。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ListCommandEventArgs クラス
ListCommandEventArgs メンバ
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント
その他の技術情報
デザイナでの ASP.NET モバイル コントロールの使用

ListCommandEventArgs フィールド


プロテクト フィールドプロテクト フィールド

  名前 説明
プロテクト フィールド DefaultCommand 既定のコマンドの名前を設定します。値の取得も可能です。
参照参照

関連項目

ListCommandEventArgs クラス
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロールの使用

ListCommandEventArgs プロパティ


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

  名前 説明
パブリック プロパティ CommandArgument  コマンドの引数を取得します。 ( CommandEventArgs から継承されます。)
パブリック プロパティ CommandName  コマンド名を取得します。 ( CommandEventArgs から継承されます。)
パブリック プロパティ CommandSource イベントの発生元のコントロールを返します。
パブリック プロパティ ListItem イベントを生成したリスト項目を返します。
参照参照

関連項目

ListCommandEventArgs クラス
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロールの使用

ListCommandEventArgs メソッド


ListCommandEventArgs メンバ

List コントロールの ItemCommand イベントのデータを提供します。

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


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ListCommandEventArgs オーバーロードされます。 ListCommandEventArgs クラスの新しいインスタンスを初期化します。
プロテクト フィールドプロテクト フィールド
  名前 説明
プロテクト フィールド DefaultCommand 既定のコマンドの名前を設定します。値の取得も可能です。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ CommandArgument  コマンドの引数を取得します。(CommandEventArgs から継承されます。)
パブリック プロパティ CommandName  コマンド名を取得します。(CommandEventArgs から継承されます。)
パブリック プロパティ CommandSource イベントの発生元のコントロールを返します。
パブリック プロパティ ListItem イベントを生成したリスト項目を返します。
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ListCommandEventArgs クラス
System.Web.UI.MobileControls 名前空間
Command.ItemCommand イベント

その他の技術情報

デザイナでの ASP.NET モバイル コントロールの使用



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「ListCommandEventArgs」の関連用語

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

   

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



ListCommandEventArgsのページの著作権

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

©2026 GRAS Group, Inc.RSS