This documentation is archived and is not being maintained.

EntityDataSource.Updated Event

Occurs after changes to an object have been persisted to the data source.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web.Entity (in System.Web.Entity.dll)

public event EventHandler<EntityDataSourceChangedEventArgs> Updated
<asp:EntityDataSource OnUpdated="EventHandler" />

The Updated event is raised when changes to a modified object are persisted to the data source or if an error has occurred when applying changes. The Entity property of the EntityDataSourceChangedEventArgs object is used to access the modified object.

The properties of this object contain values returned from the data source, including any server-generated values.

If an error occurs when changes are persisted to the data source, the Updated event is raised and the Exception property of the EntityDataSourceChangedEventArgs object is set to the returned Exception. If you handle the exception in the Updated event handler, set the ExceptionHandled property to true. This prevents the exception from being raised again. When you specify a value of false for the ExceptionHandled property, the EntityDataSource re-raises the exception.

.NET Framework

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.