ObjectDataSource.Selecting 事件
定義
public:
event System::Web::UI::WebControls::ObjectDataSourceSelectingEventHandler ^ Selecting;
public event System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler Selecting;
member this.Selecting : System.Web.UI.WebControls.ObjectDataSourceSelectingEventHandler
Public Custom Event Selecting As ObjectDataSourceSelectingEventHandler
事件類型
備註
處理 Selecting 事件,以執行應用程式特定的其他初始化、驗證參數的值,或在控制項執行資料抓取作業之前變更參數值 ObjectDataSource 。Handle the Selecting event to perform additional initialization that is specific to your application, to validate the values of parameters, or to change the parameter values before the ObjectDataSource control performs the data retrieval operation. 這些參數可當做由 IDictionary InputParameters 物件所公開之屬性存取的集合 ObjectDataSourceMethodEventArgs 。The parameters are available as an IDictionary collection that is accessed by the InputParameters property, which is exposed by the ObjectDataSourceMethodEventArgs object.
Select如果已設定屬性,則會對方法的單一呼叫引發兩次此事件 SelectCountMethod 。This event can be fired twice for a single call to the Select method, if the SelectCountMethod property is set. ExecutingSelectCount物件的屬性 ObjectDataSourceSelectingEventArgs 是用來判斷是否呼叫了 select 來抓取資料或取得計數。The ExecutingSelectCount property of the ObjectDataSourceSelectingEventArgs object is used to determine if select was called to retrieve data or retrieve the count.
如需如何處理事件的詳細資訊,請參閱 處理和引發事件。For more information about how to handle events, see Handling and Raising Events.