Share via


AppSettingsExpressionBuilder.EvaluateExpression 方法

定义

从 Web.config 文件的 <appSettings> 节返回一个值。

public:
 override System::Object ^ EvaluateExpression(System::Object ^ target, System::Web::UI::BoundPropertyEntry ^ entry, System::Object ^ parsedData, System::Web::Compilation::ExpressionBuilderContext ^ context);
public override object EvaluateExpression (object target, System.Web.UI.BoundPropertyEntry entry, object parsedData, System.Web.Compilation.ExpressionBuilderContext context);
override this.EvaluateExpression : obj * System.Web.UI.BoundPropertyEntry * obj * System.Web.Compilation.ExpressionBuilderContext -> obj
Public Overrides Function EvaluateExpression (target As Object, entry As BoundPropertyEntry, parsedData As Object, context As ExpressionBuilderContext) As Object

参数

target
Object

包含属性项的对象。

entry
BoundPropertyEntry

表达式绑定到的属性。

parsedData
Object

表示由 ParseExpression(String, Type, ExpressionBuilderContext) 返回的已分析数据的对象。

context
ExpressionBuilderContext

控件或页的属性。

返回

与 Web.config 文件的 <appSettings> 部分中某个键关联的 Object

注解

在未编译页中遇到窗体 <%$ AppSettings: someApplicationSetting %> 的表达式时,将调用此方法。 它从 Web.config 文件的 节中的 <appSettings> 键/值对中检索相应的值。 此方法通过将 ExpressionGetAppSetting 属性作为参数、属性上的 PropertyEntry.PropertyInfo 属性作为keypropertyName参数、Name参数的 targetTypetarget 作为参数Type调用 方法替代EvaluateExpression

适用于

另请参阅