System.Web 2.0.0.0 System.EventArgs

The control raises the event when a Delete button (a button with its CommandName property set to "Delete") within the control is clicked, but after the control deletes the record. This allows you to provide an event-handling method that performs a custom routine, such as checking the results of a delete operation, whenever this event occurs.

A object is passed to the event-handling method, which allows you to determine the number of records affected and any exceptions that might have occurred. To determine the number of records affected by the delete operation, use the property. Use the property to determine whether any exceptions occurred. You can also indicate whether the exception was handled in the event-handling method by setting the property.

If an exception occurs during the delete operation and the property is set to false, the control re-throws the exception.

If you want to access the name/value pairs of the key fields and non-key fields of the deleted record, use the and properties, respectively.

For more information about handling events, see Consuming Events.

Provides data for the event.

- Constructor

  Use this constructor to initialize a new instance of the class.

  The following table shows the initial property values for an instance of .

  Property

  Initial value

  The value of the parameter.

  The object contained in the parameter.

  Initialized to false.

  This constructor is used primarily by control developers when raising events.

  Initializes a new instance of the class.

  The number of rows affected by the delete operation.
  An that represents the exception raised when the delete operation was performed. If no exception is raised, use null for this parameter.
  2.0.0.0
- Property
  System.Int32 To be added.

  Use the property to determine the number of records affected by the delete operation. This property is commonly used to verify that the correct number of records was deleted in the following situations:

  Verify that only a single record was deleted. Sometimes an improperly written delete statement can delete multiple records.

  Verify that a record was deleted when an error occurs during the delete operation that does not raise an exception.

  Verify that a record was deleted when a data source control that supports optimistic concurrency (such as the and controls) has its property set to the ConflictOptions.CompareAllValues enumeration value. Under this setting, a record that has been modified by another user concurrently might not be deleted.

  Gets the number of rows affected by the delete operation.

  2.0.0.0
- Property
  System.Exception To be added.

  Use the property to determine the exception that was raised during the delete operation. If no exceptions were raised, this property returns null.

  If an exception was raised and you decide to handle the exception in the event handler, be sure to set the property to true; otherwise, the control re-throws the exception.

  Gets the exception (if any) that was raised during the delete operation.

  2.0.0.0
- Property
  System.Boolean To be added.

  When an exception is raised during the delete operation, use the property to indicate whether the exception was handled in the event handler. When this property is set to true, the exception is considered handled and is not re-thrown. If this property is set to false, the control re-throws the exception. To determine which exception was raised, use the property.

  Gets or sets a value indicating whether an exception that was raised during the delete operation was handled in the event handler.

  2.0.0.0
- Property
  System.Collections.Specialized.IOrderedDictionary To be added.

  Use the property to access the values of the key fields (as specified by the property) for a deleted record. For example, you can use these values to keep a log of deleted records.

  This property contains only the key fields. To access the non-key fields, use the property.

  The property returns an object that implements the interface. The object contains objects that represent the key fields of the deleted record.

  Gets an ordered dictionary of key field name/value pairs for the deleted record.

  2.0.0.0
- Property
  System.Collections.Specialized.IOrderedDictionary To be added.

  Use the property to access the values of the non-key fields for a deleted record. For example, you can use these values to keep a log of deleted records.

  The property is populated only when two-way binding expressions are used in the item template. For more information on two-way binding expressions, see ASP.NET Data Binding.

  The property returns an object that implements the interface. The object contains objects that represent the non-key fields of the deleted record.

  This property does not contain the key fields (as specified by the property) for the deleted record. To access the key fields, use the property.

  Gets a dictionary of the non-key field name/value pairs for the deleted record.

  2.0.0.0