DataSourceExpression.SetContext Method

Definition

Sets the HTTP context of the DataSourceExpression object that uses the specified owner control, HttpContext instance, and IQueryableDataSource object.

C#
public virtual void SetContext(System.Web.UI.Control owner, System.Web.HttpContext context, System.Web.UI.WebControls.IQueryableDataSource dataSource);

Parameters

owner
Control

The owner control of the IQueryable data source object.

context
HttpContext

The data context to use.

dataSource
IQueryableDataSource

The IQueryable data source object to use.

Applies to

产品 版本
.NET Framework 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