ExpressionEditor::GetExpressionEditor Method (String, IServiceProvider)
Returns an ExpressionEditor implementation that is associated with the specified expression prefix.
Assembly: System.Design (in System.Design.dll)
public: static ExpressionEditor^ GetExpressionEditor( String^ expressionPrefix, IServiceProvider^ serviceProvider )
Parameters
- expressionPrefix
- Type: System::String
The expression prefix used to find 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::ExpressionEditorAn ExpressionEditor implementation associated with expressionPrefix; otherwise, nullptr, if expressionPrefix is not defined or is not associated with an ExpressionEditor.
| Exception | Condition |
|---|---|
| ArgumentNullException | serviceProvider is nullptr. |
Use the static GetExpressionEditor method 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.
To find the associated expression editor for an expression prefix, the GetExpressionEditor method enumerates the available ExpressionBuilder implementations for a matching prefix. The ExpressionBuilder implementations can be configured in the expressionBuilders section of the Web configuration file. If an available ExpressionBuilder implementation defines the expression prefix, the GetExpressionEditor method returns the type that is specified in the ExpressionEditorAttribute attribute of the ExpressionBuilder metadata.
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
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.