通过


SqlDataSourceView.Select(DataSourceSelectArguments) 方法

定义

使用 SelectCommand SQL 字符串和集合中的任何 SelectParameters 参数从基础数据库检索数据。

public:
 System::Collections::IEnumerable ^ Select(System::Web::UI::DataSourceSelectArguments ^ arguments);
public System.Collections.IEnumerable Select(System.Web.UI.DataSourceSelectArguments arguments);
override this.Select : System.Web.UI.DataSourceSelectArguments -> System.Collections.IEnumerable
Public Function Select (arguments As DataSourceSelectArguments) As IEnumerable

参数

arguments
DataSourceSelectArguments

DataSourceSelectArguments用于在基本数据检索之外请求对数据执行的操作。

返回

IEnumerable数据行的列表。

例外

selectArgs传递给该方法时,传递给Select(DataSourceSelectArguments)该方法指定数据源在检索数据时应执行一些附加工作,以启用分页或对检索的数据进行排序,但数据源控件不支持请求的功能。

无法 SqlDataSource 与基础数据源建立连接。

注解

该方法 Select 调用该方法 ExecuteSelect ,传递 selectArgs 参数。

如果属性设置为DataSet值或返回对象(如果该DataSourceMode属性设置为DataReader值),则ExecuteSelect该方法将返回一个IDataReaderDataViewDataSourceMode对象。 IDataReader读取完数据后关闭对象。

适用于

另请参阅