Provides data for the DetailsView.ItemCommand event.
See Also: DetailsViewCommandEventArgs Members
The System.Web.UI.WebControls.DetailsView control raises the DetailsView.ItemCommand event when a button within a System.Web.UI.WebControls.ButtonField, System.Web.UI.WebControls.CommandField, or System.Web.UI.WebControls.TemplateField row field is clicked. This allows you to provide an event handler that performs a custom routine whenever this event occurs.
The System.Web.UI.WebControls.DetailsView control also raises other specialized events when certain buttons are clicked (buttons with the CommandName property set to "Delete", "Insert", "Page", or "Update"). When using one of these buttons, you should consider using one of the specialized events provided by the control (such as DetailsView.ItemDeleted or DetailsView.ItemDeleting).
A System.Web.UI.WebControls.DetailsViewCommandEventArgs object is passed to the event handler. If the button that raised the event has a command name or command argument value, you can use the System.Web.UI.WebControls.DetailsViewCommandEventArgs object to determine these values. To determine the command name and command argument of the button clicked, use the CommandEventArgs.CommandName and CommandEventArgs.CommandArgument properties, respectively. You can also access the System.Web.UI.WebControls.DetailsView control that raised the event by using the DetailsViewCommandEventArgs.CommandSource property.
For a list of initial property values for an instance of the System.Web.UI.WebControls.DetailsViewCommandEventArgs class, see the DetailsViewCommandEventArgs.#ctor(object, CommandEventArgs) constructor.