System.Web.UI.WebControls.ObjectDataSource.GetView Method

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

Syntax

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

Parameters

viewName
The name of the view to retrieve. Because the System.Web.UI.WebControls.ObjectDataSource supports only one view, viewName is ignored.

Returns

The System.Web.UI.WebControls.ObjectDataSourceView named DefaultView that is associated with the System.Web.UI.WebControls.ObjectDataSource.

Remarks

The System.Web.UI.WebControls.ObjectDataSource control supports only one data source view. As with all data source view objects, the System.Web.UI.WebControls.ObjectDataSourceView that is associated with the data source control defines its capabilities, performs all the work that is necessary to retrieve data from the underlying data storage, and performs operations such as sorting, inserting, deleting, and updating.

The ObjectDataSource.GetView(string) method is intended to be called by data-bound controls, not by page code.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0