System.Web.Compilation.AppSettingsExpressionBuilder.EvaluateExpression Method

Returns a value from the <appSettings> section of the Web.config file.

Syntax

public override object EvaluateExpression (object target, System.Web.UI.BoundPropertyEntry entry, object parsedData, ExpressionBuilderContext context)

Parameters

target
The object that contains the property entry.
entry
The property to which the expression is bound..
parsedData
The object that represents parsed data as returned by ExpressionBuilder.ParseExpression(string, Type, ExpressionBuilderContext).
context
Properties for the control or page.

Returns

The object associated with a key in the <appSettings> section of the Web.config file.

Remarks

This method is called when an expression of the form <%$ AppSettings: someApplicationSetting %> is encountered in a no-compile page. It retrieves the appropriate value from the key/value pairs in the <appSettings> section of the Web.config file. This method overrides ExpressionBuilder.EvaluateExpression(object, System.Web.UI.BoundPropertyEntry, object, ExpressionBuilderContext) by calling the AppSettingsExpressionBuilder.GetAppSetting(string, Type, string) method with the System.Web.UI.BoundPropertyEntry.Expression property as the key parameter, the System.Web.UI.PropertyEntry.Name property on the System.Web.UI.PropertyEntry.PropertyInfo property as the propertyName parameter, and the Type of the target parameter as the targetType parameter.

Requirements

Namespace: System.Web.Compilation
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0