AppSettingsExpressionEditor.EvaluateExpression Method (String, Object, Type, IServiceProvider)
Evaluates an application setting expression string and provides the design-time value for a control property.
Assembly: System.Design (in System.Design.dll)
Public Overrides Function EvaluateExpression ( expression As String, parseTimeData As Object, propertyType As Type, serviceProvider As IServiceProvider ) As Object
Parameters
- expression
-
Type:
System.String
An application setting expression string to evaluate. expression does not include the AppSettings expression prefix.
- parseTimeData
-
Type:
System.Object
An object containing additional parsing information for evaluating expression.
- propertyType
-
Type:
System.Type
The control property type.
- serviceProvider
-
Type:
System.IServiceProvider
A service provider implementation supplied by the designer host, used to obtain additional design-time services.
Return Value
Type: System.ObjectThe object referenced by expression, if the expression evaluation succeeded; otherwise, null.
The EvaluateExpression method looks up the application setting that is specified by expression, and then returns the value of the application setting.
The visual designer uses the EvaluateExpression method to evaluate an application setting expression and provide the design-time value for an associated control property. The visual designer calls the EvaluateExpression method with the expression string, and uses the evaluated expression result to assign control property values that are rendered on the design surface.
At run time, the page parser uses the EvaluateExpression and GetCodeExpression methods of the corresponding AppSettingsExpressionBuilder implementation to evaluate an expression and provide the run-time value for an associated control property.
Available since 2.0
Configuration.AppSettings
System.Web.Compilation.AppSettingsExpressionBuilder
System.Web.UI.Design.ExpressionEditorSheet
System.Web.Compilation.ExpressionBuilder
HtmlControlDesigner.Expressions
System.Web.Compilation.ExpressionEditorAttribute
AppSettingsExpressionEditor Class
System.Web.UI.Design Namespace
appSettings Element (General Settings Schema)