語言

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

屬性值

true 如果資料庫拋出的例外已被處理且控制項不應拋出 SqlDataSource ;否則, false。

備註

如果資料庫拋出例外,該 ExceptionHandled 屬性會被設定為 , false 並由 Exception 該屬性包裹該異常。 如果你使用 , SqlDataSourceStatusEventHandler你可以檢查 Exception 該物業並處理例外。 如果你處理異常,請將屬性設 ExceptionHandled 為, true 否則 SqlDataSource 控制項會拋出例外。

適用於

另請參閱