Edit

Share via


SqlDataSourceStatusEventArgs.ExceptionHandled Property

Definition

Gets or sets a value indicating whether an exception thrown by the database has been handled.

C#
public bool ExceptionHandled { get; set; }

Property Value

true if an exception thrown by the database has been handled and should not be thrown by the SqlDataSource control; otherwise, false.

Remarks

If the database throws an exception, the ExceptionHandled property is set to false and the exception is wrapped by the Exception property. If you use an SqlDataSourceStatusEventHandler, you can check the Exception property and handle the exception. If you handle the exception, set the ExceptionHandled property to true or the SqlDataSource control will throw an exception.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also