SPDataSource.GetView method (String)

Gets a specified view as an DataSourceView object.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Protected Overrides Function GetView ( _
    viewName As String _
) As DataSourceView
'Usage
Dim viewName As String
Dim returnValue As DataSourceView

returnValue = Me.GetView(viewName)
protected override DataSourceView GetView(
    string viewName
)

Parameters

Return value

Type: System.Web.UI.DataSourceView
A System.Web.UI.DataSourceView object that represents the specified data view.

Exceptions

Exception Condition
ArgumentException

The argument is not the value of the DefaultViewName field.

Remarks

You can enumerate through the set of views currently associated with the data source control by calling the GetViewNames() method. Because the SPDataSource class supports only one data source view, the GetViewNames method returns a collection that contains only one name, the value of the DefaultViewName field.

See also

Reference

SPDataSource class

SPDataSource members

GetView overload

Microsoft.SharePoint.WebControls namespace

GetViewNames()