System.Web.UI.Design.AppSettingsExpressionEditor Class

Provides properties and methods for evaluating and editing an application setting expression in a configuration file at design time.

See Also: AppSettingsExpressionEditor Members


public class AppSettingsExpressionEditor : ExpressionEditor


The System.Web.UI.Design.AppSettingsExpressionEditor class is derived from the System.Web.UI.Design.ExpressionEditor class and provides an implementation for evaluating and associating an application setting reference with a control property at design time. For example, you can bind the value of a control property to the application setting expression AppSettings:mySettingKeyName, which indicates that the control property value is set using the mySettingKeyName value in the appSettings section of the Web configuration file.

A visual designer host, such as vsprvslong, uses the System.Web.UI.Design.AppSettingsExpressionEditor class to select an application setting from the appSettings configuration section, and then evaluates the selected expression for design-time rendering.

When you browse to 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 AppSettings expression prefix from the list, the visual designer host uses the associated System.Web.UI.Design.ExpressionEditorSheet object to provide design-time editing functionality of appSettings expressions and uses System.Web.UI.Design.AppSettingsExpressionEditor methods to evaluate and convert the expression string based on the syntax for an application setting expression. The visual designer host uses the evaluated expression result to assign control property values that are rendered on the design surface.

The ExpressionEditor.ExpressionPrefix property for an System.Web.UI.Design.AppSettingsExpressionEditor object returns the string AppSettings. The System.Web.Compilation.AppSettingsExpressionBuilder class is associated with the expression prefix AppSettings and the System.Web.UI.Design.AppSettingsExpressionEditor implementation.

The AppSettingsExpressionEditor.EvaluateExpression(string, object, Type, IServiceProvider) method evaluates an input application setting expression string. The ExpressionEditor.GetExpressionEditorSheet(string, IServiceProvider) method returns the System.Web.UI.Design.ExpressionEditorSheet implementation that is used to enter and edit application setting expressions.


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