ObjectDataSource.Selecting ObjectDataSource.Selecting ObjectDataSource.Selecting ObjectDataSource.Selecting Event


Select() 操作前发生。Occurs before a Select() operation.

 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 


处理事件以执行特定于您的应用程序的其他初始化, 验证参数的值, 或者在ObjectDataSource控件执行数据检索操作之前更改参数值。 SelectingHandle 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. 参数可用作IDictionaryObjectDataSourceMethodEventArgs对象公开的InputParameters属性所访问的集合。The parameters are available as an IDictionary collection that is accessed by the InputParameters property, which is exposed by the ObjectDataSourceMethodEventArgs object.

如果设置了Select 属性,则对方法的单个调用会激发两次此事件。SelectCountMethodThis event can be fired twice for a single call to the Select method, if the SelectCountMethod property is set. ObjectDataSourceSelectingEventArgs对象ExecutingSelectCount的属性用于确定是否调用了 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.