Export (0) Print
Expand All

EntityDataSource::IDynamicDataSource::Exception Event

Occurs when validation fails in a partial methods or when an exception is raised.

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

private:
virtual   event EventHandler<DynamicValidatorEventArgs^>^ Exception {
	void add (EventHandler<DynamicValidatorEventArgs^>^ value);
	void remove (EventHandler<DynamicValidatorEventArgs^>^ value);
}
<asp:EntityDataSource OnException="EventHandler" />

Implements

IDynamicDataSource::Exception

The IDynamicDataSource::Exception event is implemented to provide for compatibility with ASP.NET Dynamic Data. This event, defined by the IDynamicDataSource interface, is explicitly implemented by the EntityDataSource. A handler for this event cannot be registered in markup. It can be used only when the EntityDataSource instance is cast to an IDynamicDataSource interface.

The IDynamicDataSource::Exception event provides an DynamicValidatorEventArgs object that returns the Exception. The IDynamicDataSource::Exception event may be raised in the following cases:

  • When an object is created. This enables the partial methods on the object to raise exceptions during validation of property settings.

  • When an exception occurs during the execution of the query.

  • When an exception occurs during the execution of any INSERT, UPDATE, or DELETE operation.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft