Export (0) Print
Expand All

SqlDataSourceView Constructor

Initializes a new instance of the SqlDataSourceView class setting the specified SqlDataSource control as the owner of the current view.

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

public SqlDataSourceView(
	SqlDataSource owner,
	string name,
	HttpContext context


Type: System.Web.UI.WebControls.SqlDataSource

The data source control with which the SqlDataSourceView is associated.

Type: System.String

A unique name for the data source view, within the scope of the data source control that owns it.

Type: System.Web.HttpContext

The current HttpContext.

The SqlDataSourceView constructor is called by the GetView method to return a new instance of a data source view with the specified name parameter. The SqlDataSource control is associated with only one SqlDataSourceView object at any one time, and always names the view Table, although this naming restriction is imposed by the SqlDataSource control, not the SqlDataSourceView. You can override the GetView method to support views with a different naming convention.

The HttpContext object that is passed by the context parameter is used by the data source view to access parameter objects, such as the FilterParameters and SelectParameters properties.

.NET Framework

Supported in: 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.

© 2014 Microsoft