SqlDataSource.GetView(String) SqlDataSource.GetView(String) SqlDataSource.GetView(String) SqlDataSource.GetView(String) Method

定义

获取与数据源控件关联的命名的数据源视图。Gets the named data source view that is associated with the data source control.

protected:
 override System::Web::UI::DataSourceView ^ GetView(System::String ^ viewName);
protected override System.Web.UI.DataSourceView GetView (string viewName);
override this.GetView : string -> System.Web.UI.DataSourceView
Protected Overrides Function GetView (viewName As String) As DataSourceView

参数

viewName
String String String String

要检索的视图的名称。The name of the view to retrieve. 由于 SqlDataSource 只支持一个视图,因此 viewName 被忽略。Because the SqlDataSource supports only one view, viewName is ignored.

返回

SqlDataSourceView 相关联的名为“Table”的 SqlDataSourceThe SqlDataSourceView named "Table" that is associated with the SqlDataSource.

异常

viewNamenullTable 以外的值。viewName is null or something other than Table.

注解

SqlDataSource控件仅支持一个数据源视图。The SqlDataSource control supports only one data source view. 与所有数据源视图对象一样, 与SqlDataSourceView数据源控件关联的对象定义其功能, 执行从基础数据库检索数据所需的所有工作, 并执行排序等操作。插入、删除和更新。As with all data source view objects, the SqlDataSourceView object that is associated with the data source control defines its capabilities, performs all work that is necessary to retrieve data from the underlying database, and performs operations, such as sorting, inserting, deleting, and updating.

适用于

另请参阅