AppSettingsExpressionEditor.EvaluateExpression Method

Evaluates an application setting expression string and provides the design-time value for a control property.

Namespace: System.Web.UI.Design
Assembly: System.Design (in system.design.dll)

public:
virtual Object^ EvaluateExpression (
	String^ expression, 
	Object^ parseTimeData, 
	Type^ propertyType, 
	IServiceProvider^ serviceProvider
) override
public Object EvaluateExpression (
	String expression, 
	Object parseTimeData, 
	Type propertyType, 
	IServiceProvider serviceProvider
)
public override function EvaluateExpression (
	expression : String, 
	parseTimeData : Object, 
	propertyType : Type, 
	serviceProvider : IServiceProvider
) : Object
Not applicable.

Parameters

expression

An application setting expression string to evaluate. expression does not include the AppSettings expression prefix.

parseTimeData

An object containing additional parsing information for evaluating expression.

propertyType

The control property type.

serviceProvider

A service provider implementation supplied by the designer host, used to obtain additional design-time services.

Return Value

The object referenced by expression, if the expression evaluation succeeded; otherwise, a null reference (Nothing in Visual Basic).

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.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: