Export (0) Print
Expand All

ObjectDataSource.GetView Method

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)

protected override DataSourceView GetView(
	string viewName
)

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.

ExceptionCondition
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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft