Provides data for the DetailsView.ItemUpdated event.
See Also: DetailsViewUpdatedEventArgs Members
The System.Web.UI.WebControls.DetailsView control raises the DetailsView.ItemUpdated event when an Update button (a button with its CommandName property set to "Update") within the control is clicked, but after the System.Web.UI.WebControls.DetailsView control updates the record. This allows you to provide an event handler that performs a custom routine, such as checking the results of an update operation, whenever this event occurs.
A System.Web.UI.WebControls.DetailsViewUpdatedEventArgs object is passed to the event handler, 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 update operation, use the DetailsViewUpdatedEventArgs.AffectedRows property. Use the DetailsViewUpdatedEventArgs.Exception property to determine whether any exceptions occurred. You can also indicate whether the exception was handled in the event handler by setting the DetailsViewUpdatedEventArgs.ExceptionHandled property. If you need to access the key field values for the updated record, use the DetailsViewUpdatedEventArgs.Keys property. The original and updated non-key field values can be accessed using the DetailsViewUpdatedEventArgs.OldValues and DetailsViewUpdatedEventArgs.NewValues properties, respectively.
By default, the System.Web.UI.WebControls.DetailsView control returns to the mode specified by the DetailsView.DefaultMode property after an update operation. To keep the System.Web.UI.WebControls.DetailsView control in edit mode, set the DetailsViewUpdatedEventArgs.KeepInEditMode property to true.
For more information about handling events, see Consuming Events.
For a list of initial property values for an instance of the System.Web.UI.WebControls.DetailsViewUpdatedEventArgs class, see the DetailsViewUpdatedEventArgs.#ctor(int, Exception) constructor.