Export (0) Print
Expand All

IDataSource.GetView Method

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

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

abstract GetView : 
        viewName:string -> DataSourceView

Parameters

viewName
Type: System.String

The name of the view to retrieve.

Return Value

Type: System.Web.UI.DataSourceView
Returns the named DataSourceView associated with the IDataSource.

Data source control classes can support one or more views on their underlying data. These views are represented by instances of the DataSourceView class. The data source view defines the capabilities of a data source control, and performs all the work necessary to retrieve data from the underlying data store and perform operations such as sorting, inserting, deleting, and updating.

Data source control classes that implement the IDataSource interface implement the GetView method to return strongly typed view objects associated with the class.

The following code example demonstrates how a data source control class that implements the IDataSource interface implements the GetView method, returning a strongly typed instance of the DataSourceView class. Because the data source control supports only one view, it ignores the name and returns a view named with the default view name. This code example is part of a larger example provided for the DataSourceControl class.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Show:
© 2014 Microsoft