ListViewCommandEventArgs Class
Provides data for the ItemCommand event.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
System.EventArgs
System.Web.UI.WebControls.CommandEventArgs
System.Web.UI.WebControls.ListViewCommandEventArgs
| Name | Description | |
|---|---|---|
![]() | ListViewCommandEventArgs(ListViewItem, Object, CommandEventArgs) | Initializes a new instance of the ListViewCommandEventArgs class by using the specified source of the command and event arguments. |
| Name | Description | |
|---|---|---|
![]() | CommandArgument | Gets the argument for the command.(Inherited from CommandEventArgs.) |
![]() | CommandName | Gets the name of the command.(Inherited from CommandEventArgs.) |
![]() | CommandSource | Gets the source of the command. |
![]() | Handled | |
![]() | Item | Gets the data item for which the command was issued. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
The ItemCommand event is raised when a button in the ListView control is clicked. This enables you to provide an event-handling method that performs a custom routine whenever this event occurs.
Note |
|---|
The ListView control also raises other events when certain buttons are clicked (for example, buttons with the CommandName property set to "Delete", "Update", or "Page"). When you use one of these buttons, you can handle one of the specialized events that are provided by the control, such as the ItemDeleted or ItemDeleting events. |
A ListViewCommandEventArgs object is passed to the event-handling method, which enables you to determine the command name and command argument of the button that was clicked. To determine the command name use the CommandName property, and to determine the command argument, use the CommandArgument property. You can also access the button control that raised the event by using the CommandSource property.
For a list of initial property values for an instance of the ListViewCommandEventArgs class, see the ListViewCommandEventArgs constructor.
Available since 3.5
Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



