System.Web.UI.Design.ExpressionEditor.GetExpressionEditor Method

Returns an System.Web.UI.Design.ExpressionEditor implementation that is associated with the specified expression prefix.

Syntax

public static ExpressionEditor GetExpressionEditor (string expressionPrefix, IServiceProvider serviceProvider)

Parameters

expressionPrefix
The expression prefix used to find the associated expression editor.
serviceProvider
A service provider implementation supplied by the designer host, used to obtain additional design-time services.

Returns

An System.Web.UI.Design.ExpressionEditor implementation associated with expressionPrefix; otherwise, null, if expressionPrefix is not defined or is not associated with an System.Web.UI.Design.ExpressionEditor.

Remarks

Use the static erload:System.Web.UI.Design.ExpressionEditor.GetExpressionEditor method overloads to find the System.Web.UI.Design.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 System.Web.Compilation.ExpressionBuilder and System.Web.UI.Design.ExpressionEditor classes.

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

To find the associated expression editor for an expression prefix, the erload:System.Web.UI.Design.ExpressionEditor.GetExpressionEditor method enumerates the available System.Web.Compilation.ExpressionBuilder implementations for a matching prefix. The System.Web.Compilation.ExpressionBuilder implementations can be configured in the expressionBuilders section of the Web configuration file. If an available System.Web.Compilation.ExpressionBuilder implementation defines the expression prefix, the erload:System.Web.UI.Design.ExpressionEditor.GetExpressionEditor method returns the type that is specified in the System.Web.Compilation.ExpressionEditorAttribute attribute of the System.Web.Compilation.ExpressionBuilder metadata.

Requirements

Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0