ControlParameter.Evaluate(HttpContext, Control) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Updates and returns the value of the ControlParameter 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
Parameters
- context
- HttpContext
The current HttpContext of the request.
Returns
An Object that represents the updated and current value of the parameter.
Exceptions
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.
FindControl(String) does not return the specified control.
-or-
The control identified by the ControlID property does not support the property named by PropertyName.
Remarks
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 null
, null
is returned.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기