SqlDataSourceStatusEventArgs.ExceptionHandled 屬性

定義

取得或設定值,指出是否已處理資料庫擲回的例外狀況。

public:
 property bool ExceptionHandled { bool get(); void set(bool value); };
public bool ExceptionHandled { get; set; }
member this.ExceptionHandled : bool with get, set
Public Property ExceptionHandled As Boolean

屬性值

如果資料庫擲回的例外狀況已經過處理且不應由 SqlDataSource 控制項擲回,則為 true,否則為 false

備註

如果資料庫擲回例外狀況,屬性 ExceptionHandled 會設定為 false ,而且例外狀況會由 Exception 屬性包裝。 如果您使用 SqlDataSourceStatusEventHandler ,您可以檢查 Exception 屬性並處理例外狀況。 如果您處理例外狀況,請將 ExceptionHandled 屬性設定為 trueSqlDataSource 控制項會擲回例外狀況。

適用於

另請參閱