Raises the DataList.DeleteCommand event. This allows you to provide a custom handler for the event.
- e
- A System.Web.UI.WebControls.DataListCommandEventArgs that contains event data.
Use the DataList.OnDeleteCommand(DataListCommandEventArgs) method to provide a custom handler for the DataList.DeleteCommand event.
The DataList.DeleteCommand event is raised when the Delete button is clicked for an item in the System.Web.UI.WebControls.DataList control.
A typical handler for the DataList.DeleteCommand event removes the selected item from the data source and then rebinds the data to the System.Web.UI.WebControls.DataList control.
Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.
The DataList.OnDeleteCommand(DataListCommandEventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.