SqlDataSource.GetView Method

Gets 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:
virtual DataSourceView^ GetView (
	String^ viewName
) override
protected DataSourceView GetView (
	String viewName
)
protected override function GetView (
	viewName : String
) : DataSourceView
Not applicable.

Parameters

viewName

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

Return Value

The SqlDataSourceView named "Table" that is associated with the SqlDataSource.

Exception typeCondition

ArgumentException

viewName is a null reference (Nothing in Visual Basic) or something other than Table.

The SqlDataSource control supports only one data source view. As with all data source view objects, the SqlDataSourceView object that is associated with the data source control defines its capabilities, performs all work that is necessary to retrieve data from the underlying database, and performs operations, such as sorting, inserting, deleting, and updating.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: