CookieParameter.Evaluate(HttpContext, Control) 方法

定义

更新并返回 CookieParameter 对象的值。Updates and returns the value of the CookieParameter object.

protected:
 override System::Object ^ Evaluate(System::Web::HttpContext ^ context, System::Web::UI::Control ^ control);
protected public:
 override System::Object ^ Evaluate(System::Web::HttpContext ^ context, System::Web::UI::Control ^ control);
protected override object Evaluate (System.Web.HttpContext context, System.Web.UI.Control control);
protected internal override object Evaluate (System.Web.HttpContext context, System.Web.UI.Control control);
override this.Evaluate : System.Web.HttpContext * System.Web.UI.Control -> obj
Protected Overrides Function Evaluate (context As HttpContext, control As Control) As Object
Protected Friend Overrides Function Evaluate (context As HttpContext, control As Control) As Object

参数

context
HttpContext

请求的当前 HttpContextThe current HttpContext of the request.

control
Control

与使用 Control 的 Web 窗体页相关联的 CookieParameterA Control that is associated with the Web Forms page where the CookieParameter is used.

返回

Object

一个对象,表示参数的更新值和当前值。An object that represents the updated and current value of the parameter. 如果上下文或请求为 null,则 Evaluate(HttpContext, Control) 方法返回空。If the context or the request is null, the Evaluate(HttpContext, Control) method returns null.

注解

context方法使用参数 Evaluate 检索 cookie 集合以及对象绑定到的 cookie 的值 CookieParameterThe context parameter is used by the Evaluate method to retrieve the cookies collection and the value of the cookie that the CookieParameter object binds to. control忽略参数。The control parameter is ignored.

适用于

另请参阅