ObjectDataSourceSelectingEventArgs 類別

定義

提供 Selecting 控制項的 ObjectDataSource 事件資料。

public ref class ObjectDataSourceSelectingEventArgs : System::Web::UI::WebControls::ObjectDataSourceMethodEventArgs
public class ObjectDataSourceSelectingEventArgs : System.Web.UI.WebControls.ObjectDataSourceMethodEventArgs
type ObjectDataSourceSelectingEventArgs = class
    inherit ObjectDataSourceMethodEventArgs
Public Class ObjectDataSourceSelectingEventArgs
Inherits ObjectDataSourceMethodEventArgs
繼承

備註

類別 ObjectDataSourceSelectingEventArgs 用於 OnSelecting 方法中。 因為其衍生自 ObjectDataSourceMethodEventArgs 類別,所以 類別 ObjectDataSourceSelectingEventArgs 會提供輸入參數的存取權,以便透過 InputParameters 屬性進行驗證和操作。 類別 ObjectDataSourceSelectingEventArgs 也提供 ExecutingSelectCount 屬性,這個屬性可用來檢查目前執行的資料擷取作業是否正在擷取資料列計數,以及資料。 這很重要,因為啟用資料來源分頁時, Selecting 事件會引發兩次。 如需詳細資訊,請參閱ExecutingSelectCount

控制項 ObjectDataSource 會公開許多您可以處理的事件,以在其生命週期中的各種時間使用基礎商務物件。 下表列出事件和相關聯的 EventArgs 類別和事件處理常式委派。

事件 EventArgs EventHandler
ObjectCreating.

會在具現化商務物件之前立即發生。
ObjectDataSourceEventArgs ObjectDataSourceObjectEventHandler
ObjectCreated.

在具現化商務物件之後立即發生。
ObjectDataSourceEventArgs ObjectDataSourceObjectEventHandler
Selecting.

發生于擷取資料之前。
ObjectDataSourceSelectingEventArgs ObjectDataSourceSelectingEventHandler
InsertingUpdatingDeleting

發生于執行插入、更新或刪除作業之前。
ObjectDataSourceMethodEventArgs ObjectDataSourceMethodEventHandler
Selected.

發生于擷取資料之後。
ObjectDataSourceStatusEventArgs ObjectDataSourceStatusEventHandler
InsertedUpdatedDeleted

發生于插入、更新或刪除作業完成之後。
ObjectDataSourceStatusEventArgs ObjectDataSourceStatusEventHandler
ObjectDisposing.

在終結商務物件之前發生。
ObjectDataSourceDisposingEventArgs ObjectDataSourceDisposingEventHandler

建構函式

ObjectDataSourceSelectingEventArgs(IOrderedDictionary, DataSourceSelectArguments, Boolean)

初始化 ObjectDataSourceSelectingEventArgs 類別的新執行個體。

屬性

Arguments

提供一個機制,讓 ObjectDataSource 物件用來在擷取資料時要求資料相關作業。

Cancel

取得或設定值,這個值表示是否應該取消事件。

(繼承來源 CancelEventArgs)
ExecutingSelectCount

取得值,指出 ObjectDataSource 是否在資料擷取作業中擷取資料列計數。

InputParameters

取得包含商務物件方法參數和其值的集合。

(繼承來源 ObjectDataSourceMethodEventArgs)

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱