ObjectDataSource.GetView Method (String)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

override GetView : 
        viewName:string -> DataSourceView

Parameters

viewName
Type: System.String

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

Return Value

Type: System.Web.UI.DataSourceView

The ObjectDataSourceView named DefaultView that is associated with the ObjectDataSource.

Exception Condition
ArgumentException

The specified viewName is null or something other than DefaultView.

The ObjectDataSource control supports only one data source view. As with all data source view objects, the 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 GetView method is intended to be called by data-bound controls, not by page code.

.NET Framework
Available since 2.0
Return to top
Show: