ControlParameter.Evaluate(HttpContext, Control) ControlParameter.Evaluate(HttpContext, Control) ControlParameter.Evaluate(HttpContext, Control) Method


Updates and returns the value of the ControlParameter object.

protected public:
 override System::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


HttpContext HttpContext HttpContext

The current HttpContext of the request.

Control Control Control

The Control that the parameter is bound to.


An Object that represents the updated and current value of the parameter.


The ControlID property is not set.


The PropertyName property is not set and the Control identified by the ControlID property is not decorated with a ControlValuePropertyAttribute attribute.

FindControl(String) does not return the specified control.


The control identified by the ControlID property does not support the property named by PropertyName.


The ControlParameter object attempts to bind to the Control object and property every time the Evaluate method is called. The Evaluate method returns the value of the control's property that is identified by the combination of the ControlID and PropertyName properties.

The ControlParameter class never uses the DefaultValue property, which is inherited from Parameter, when binding to a control's property value.


In this implementation of the method, the context parameter is ignored. If the control parameter is null, null is returned.

Applies to

See also