DataSourceControl.IDataSource.GetView(String) Method

Definition

Gets the named DataSourceView object associated with the DataSourceControl control. Some data source controls support only one view, while others support more than one.

C#
System.Web.UI.DataSourceView IDataSource.GetView(string viewName);

Parameters

viewName
String

The name of the DataSourceView to retrieve. In data source controls that support only one view, such as SqlDataSource, this parameter is ignored.

Returns

Returns the named DataSourceView associated with the DataSourceControl.

Implements

Exceptions

viewName is null.

Remarks

The viewName parameter is ignored when this method is called on data source controls that support only one view, such as the SqlDataSource and AccessDataSource controls.

Poznámka

The DataSourceControl class's default implementation, which is called by this interface method, returns null. If you extend the DataSourceControl class, override the GetView method to return the specified DataSourceView object.

Applies to

Produkt Verzie
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

See also