ListCommandEventArgs Sınıf

Tanım

Dikkat

The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.

Bir List denetimin ItemCommand olayı için veri sağlar. ASP.NET mobil uygulama geliştirme hakkında bilgi için bkz. ASP.NET ile Mobile Apps & Siteleri.

public ref class ListCommandEventArgs : System::Web::UI::WebControls::CommandEventArgs
public class ListCommandEventArgs : System.Web.UI.WebControls.CommandEventArgs
[System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public class ListCommandEventArgs : System.Web.UI.WebControls.CommandEventArgs
type ListCommandEventArgs = class
    inherit CommandEventArgs
[<System.Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")>]
type ListCommandEventArgs = class
    inherit CommandEventArgs
Public Class ListCommandEventArgs
Inherits CommandEventArgs
Devralma
ListCommandEventArgs
Öznitelikler

Örnekler

Aşağıdaki kod örneği, öğeye tıklandığında listedeki görevlerin durumunu değiştirmek için nesnesini nasıl kullanabileceğinizi ListCommandEventArgs gösterir. Bu örnek, genel bakış için List daha büyük bir örneğin parçasıdır.

Not

Aşağıdaki kod örneği tek dosyalı kod modelini kullanır ve doğrudan arka planda kod dosyasına kopyalandığında düzgün çalışmayabilir. Bu kod örneği, .aspx uzantısına sahip boş bir metin dosyasına kopyalanmalıdır. Daha fazla bilgi için bkz. ASP.NET Web Forms Sayfa Kodu Modeli.

private void Status_ItemCommand(object sender, 
    ListCommandEventArgs e)
{
    const string spec = "You now have {0} " + 
        "tasks done, {1} tasks scheduled, and " +
        "{2} tasks pending.";

    // Move selection to next status toward 'done'
    switch (e.ListItem.Value)
    {
        case "scheduled":
            schedCount -= 1;
            pendCount += 1;
            e.ListItem.Value = "pending";
            break;
        case "pending":
            pendCount -= 1;
            doneCount += 1;
            e.ListItem.Value = "done";
            break;
    }

    // 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);
}
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

Oluşturucular

ListCommandEventArgs(MobileListItem, Object)
Geçersiz.

sağlanan ListItem ve CommandSourcekullanarak sınıfının yeni bir örneğini ListCommandEventArgs başlatır. Bu, API artık kullanılmıyor. ASP.NET mobil uygulama geliştirme hakkında bilgi için bkz. ASP.NET ile Mobile Apps & Siteleri.

ListCommandEventArgs(MobileListItem, Object, CommandEventArgs)
Geçersiz.

Verilen ListItem, CommandSourceve özgün komut bağımsız değişkenlerini kullanarak sınıfının yeni bir örneğini ListCommandEventArgs başlatır. Bu, API artık kullanılmıyor. ASP.NET mobil uygulama geliştirme hakkında bilgi için bkz. ASP.NET ile Mobile Apps & Siteleri.

Alanlar

DefaultCommand
Geçersiz.

Varsayılan komutun adını ayarlar veya döndürür. Bu, API artık kullanılmıyor. ASP.NET mobil uygulama geliştirme hakkında bilgi için bkz. ASP.NET ile Mobile Apps & Siteleri.

Özellikler

CommandArgument
Geçersiz.

Komutun bağımsız değişkenini alır.

(Devralındığı yer: CommandEventArgs)
CommandName
Geçersiz.

Komutun adını alır.

(Devralındığı yer: CommandEventArgs)
CommandSource
Geçersiz.

Olayı tetikleyen denetimi döndürür. Bu, API artık kullanılmıyor. ASP.NET mobil uygulama geliştirme hakkında bilgi için bkz. ASP.NET ile Mobile Apps & Siteleri.

ListItem
Geçersiz.

Olayı oluşturan liste öğesini döndürür. Bu, API artık kullanılmıyor. ASP.NET mobil uygulama geliştirme hakkında bilgi için bkz. ASP.NET ile Mobile Apps & Siteleri.

Yöntemler

Equals(Object)
Geçersiz.

Belirtilen nesnenin geçerli nesneye eşit olup olmadığını belirler.

(Devralındığı yer: Object)
GetHashCode()
Geçersiz.

Varsayılan karma işlevi işlevi görür.

(Devralındığı yer: Object)
GetType()
Geçersiz.

Type Geçerli örneğini alır.

(Devralındığı yer: Object)
MemberwiseClone()
Geçersiz.

Geçerli Objectöğesinin sığ bir kopyasını oluşturur.

(Devralındığı yer: Object)
ToString()
Geçersiz.

Geçerli nesneyi temsil eden dizeyi döndürür.

(Devralındığı yer: Object)

Şunlara uygulanır

Ayrıca bkz.