ResourceExpressionEditor.EvaluateExpression Method

Note: This method is new in the .NET Framework version 2.0.

Evaluates a resource expression 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

Parameters

expression

A resource expression to evaluate. expression does not include the Resources expression prefix.

parseTimeData

An object supplying additional parse data, in the form of a ResourceExpressionFields value.

propertyType

The type of the control property.

serviceProvider

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

Return Value

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

The EvaluateExpression method looks up the resource that is specified by expression, and then returns the resource.

The visual designer uses the EvaluateExpression method to evaluate a resource expression and provide the design-time value for an associated control property. At run time, the page parser uses the EvaluateExpression and GetCodeExpression methods of the corresponding ResourceExpressionBuilder implementation to evaluate an expression and provide the run-time value for an associated control property.

The visual designer uses the ParseExpression method to parse the expression string at design time, and then calls the EvaluateExpression method with the parsed expression data.

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: