Assembly: System.Web (in System.Web.dll)
protected internal override IEnumerable ExecuteSelect( DataSourceSelectArguments arguments )
The arguments passed to the method specify that the data source should perform some additional work while retrieving data to enable paging or sorting through the retrieved data, but the data source control does not support the requested capability.
- or -
- or -
Both caching and client impersonation are enabled. The ObjectDataSource does not support caching when client impersonation is enabled.
- or -
The ObjectDataSourceView class implements the inherited method to retrieve data using a business object. Page developers and data-bound control authors do not call the method directly; instead, use the publicly exposed Select method.
The specified method can have any method signature, but must return one of the types for the ObjectDataSource control that are listed in the following table to call it successfully.
Before the data retrieval is performed, the OnSelecting method is called to raise the Selecting event. You can handle this event to examine the values of the parameters and to perform any preprocessing before an operation.
To perform a select operation, the ObjectDataSourceView control uses reflection to call the method that is identified by the SelectMethod property and any associated parameters that are in the SelectParameters collection, and then executes it. After the operation completes, the OnSelected method is called to raise the Selected event. You can handle this event to examine any return values and error codes, and to perform any post-processing.
If the Select method returns a DataSet object and caching is enabled, the ObjectDataSourceView retrieves data from and saves data to the cache during the operation. The cache is created, discarded, or refreshed based on the caching behavior that is specified by the combination of the CacheDuration and CacheExpirationPolicy properties.
If the Select method returns a DataSet object and a FilterExpression property has been specified, it is evaluated along with any supplied FilterParameters properties and the resulting filter is applied to the list of data during the Select operation.
For information on returning the number of rows selected, see Select.