This documentation is archived and is not being maintained.

ExpressionEditor::GetExpressionEditor Method (Type, IServiceProvider)

Returns an ExpressionEditor implementation that is associated with the specified expression builder type.

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

public:
static ExpressionEditor^ GetExpressionEditor(
	Type^ expressionBuilderType, 
	IServiceProvider^ serviceProvider
)

Parameters

expressionBuilderType
Type: System::Type
The type of the derived expression builder class, used to locate the associated expression editor.
serviceProvider
Type: System::IServiceProvider
A service provider implementation supplied by the designer host, used to obtain additional design-time services.

Return Value

Type: System.Web.UI.Design::ExpressionEditor
An ExpressionEditor implementation associated with expressionBuilderType; otherwise, nullptr, if expressionBuilderType cannot be located or has no associated ExpressionEditor.

ExceptionCondition
ArgumentNullException

expressionBuilderType is nullptr.

- or -

serviceProvider is nullptr.

Use the static GetExpressionEditor overloads to find the ExpressionEditor object that is associated with a particular expression prefix or expression builder type.

For each custom expression type, an expression prefix identifies the associated expression builder and expression editor. When custom expressions are parsed in a page, the expression prefix is used to create instances of the associated ExpressionBuilder and ExpressionEditor classes.

To associate an expression prefix with an expression builder and expression editor, apply the ExpressionEditorAttribute and ExpressionPrefixAttribute attributes to the custom ExpressionBuilder class and configure the expression prefix for an expression builder in the expressionBuilders element in the Web configuration file.

The GetExpressionEditor method enumerates the available ExpressionBuilder implementations to locate expressionBuilderType. The ExpressionBuilder implementations can be configured in the expressionBuilders section of the Web configuration file. If expressionBuilderType is found in the set of available ExpressionBuilder implementations, the GetExpressionEditor method returns the type that is specified in the ExpressionEditorAttribute attribute of the ExpressionBuilder metadata.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

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