SqlDataSource.GetView(String) Method

Definition

Gets the named data source view that is associated with the data source control.

C#
protected override System.Web.UI.DataSourceView GetView(string viewName);

Parameters

viewName
String

The name of the view to retrieve. Because the SqlDataSource supports only one view, viewName is ignored.

Returns

The SqlDataSourceView named "Table" that is associated with the SqlDataSource.

Exceptions

viewName is null or something other than Table.

Remarks

The SqlDataSource control supports only one data source view. 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.

Applies to

Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also