System.Web.UI.Design.ResourceExpressionEditor Class

Provides properties and methods for evaluating and editing a resource expression at design time.

See Also: ResourceExpressionEditor Members


public class ResourceExpressionEditor : ExpressionEditor


The System.Web.UI.Design.ResourceExpressionEditor class derives from the System.Web.UI.Design.ExpressionEditor class and provides an implementation for evaluating and associating a resource reference with a control property at design time. For example, you can bind the value of a control property to the resource expression Resources:submitText, which indicates that the control property value is set using the resource named submitText.

A visual designer host, such as vsprvslong, uses the System.Web.UI.Design.ResourceExpressionEditor class to specify a resource class, key, and designer default value for a resource expression, and then evaluate the selected resource expression for design-time rendering.

When you browse the HtmlControlDesigner.Expressions property for a control in the design-time properties grid, the visual designer displays a dialog box to set expressions that provide the run-time value for a control property. You can select the expression type based on a list of expression prefixes. When you select the Resources expression prefix in the list, the visual designer uses the System.Web.UI.Design.ResourceExpressionEditor methods to set, evaluate, and convert the expression based on the resource expression syntax. The visual designer uses the evaluated expression result to assign control property values that are rendered on the design surface.

The base System.Web.Configuration.ExpressionBuilder.ExpressionPrefix property for a System.Web.Compilation.ResourceExpressionBuilder returns the string Resources. The System.Web.Compilation.ResourceExpressionBuilder class is associated with the expression prefix Resources and the System.Web.UI.Design.ResourceExpressionEditor implementation.

The ResourceExpressionEditor.EvaluateExpression(string, object, Type, IServiceProvider) method evaluates an input resource expression. The ExpressionEditor.GetExpressionEditorSheet(string, IServiceProvider) method returns the System.Web.UI.Design.ExpressionEditorSheet implementation that is used to select the resource name, class, and designer default value, and to form a resource expression from the selected resource values.


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