ControlParameter.Evaluate Method
Assembly: System.Web (in system.web.dll)
protected Object Evaluate ( HttpContext context, Control control )
protected override function Evaluate ( context : HttpContext, control : Control ) : Object
Not applicable.
Parameters
- context
The current HttpContext of the request.
- control
The Control that the parameter is bound to.
Return Value
An Object that represents the updated and current value of the parameter.| Exception type | Condition |
|---|---|
| The ControlID property is not set. - or - The PropertyName property is not set and the Control identified by the ControlID property is not decorated with a ControlValuePropertyAttribute attribute. | |
| Control.FindControl does not return the specified control. - or - 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.
Note: |
|---|
| In this implementation of the method, the context parameter is ignored. If the control parameter is a null reference (Nothing in Visual Basic), a null reference (Nothing in Visual Basic) is returned. |
Note: