This documentation is archived and is not being maintained.

ConnectionStringsExpressionEditor::EvaluateExpression Method

This member overrides ExpressionEditor::EvaluateExpression(String, Object, Type, IServiceProvider), and more complete documentation might be available in that topic.

Evaluates a connection string 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

Parameters

expression
Type: System::String

A connection string expression to evaluate. The expression does not include the ConnectionStrings expression prefix.

parseTimeData
Type: System::Object

An object containing additional parsing information for evaluating the expression.

propertyType
Type: System::Type

The type of the control property.

serviceProvider
Type: System::IServiceProvider

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

Return Value

Type: System::Object
The object referenced by the evaluated expression string if the expression evaluation succeeded; otherwise, nullptr.

The EvaluateExpression method looks up the connection name and type specified by expression, and then returns the connection.

The visual designer uses the EvaluateExpression method to evaluate a connection string expression and provide the design-time value for an associated control property. The visual designer uses the ConnectionStringsExpressionBuilder::ParseExpression method to parse the expression string at design time, and then calls the EvaluateExpression method with the parsed expression data. The visual designer 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 ConnectionStringsExpressionBuilder implementation to evaluate an expression and provide the run-time value for an associated control property.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: