DataSourceExpression.SetContext(Control, HttpContext, IQueryableDataSource) 方法

定義

設定 DataSourceExpression 物件的 HTTP 內容,該物件會使用指定的擁有者控制項、HttpContext 執行個體和 IQueryableDataSource 物件。Sets the HTTP context of the DataSourceExpression object that uses the specified owner control, HttpContext instance, and IQueryableDataSource object.

public:
 virtual void SetContext(System::Web::UI::Control ^ owner, System::Web::HttpContext ^ context, System::Web::UI::WebControls::IQueryableDataSource ^ dataSource);
public virtual void SetContext (System.Web.UI.Control owner, System.Web.HttpContext context, System.Web.UI.WebControls.IQueryableDataSource dataSource);
abstract member SetContext : System.Web.UI.Control * System.Web.HttpContext * System.Web.UI.WebControls.IQueryableDataSource -> unit
override this.SetContext : System.Web.UI.Control * System.Web.HttpContext * System.Web.UI.WebControls.IQueryableDataSource -> unit
Public Overridable Sub SetContext (owner As Control, context As HttpContext, dataSource As IQueryableDataSource)

參數

owner
Control

IQueryable 資料來源物件的擁有者控制項。The owner control of the IQueryable data source object.

context
HttpContext

要使用的資料內容。The data context to use.

dataSource
IQueryableDataSource

要使用的 IQueryable 資料來源物件。The IQueryable data source object to use.

適用於