We recommend using Visual Studio 2017

Expressions Dialog Box

Visual Studio 2010

The Expressions dialog box enables you to create an expression and assign its value to a property. Expressions can get values from the AppSettings element in the Web.config file, from the ConnectionStrings element in the Web.config file, and from resources (.resx files).

To open the Expressions dialog box

  1. In Visual Web Developer, create or open an existing .aspx page and switch to Design view.

  2. From the Standard group of the Toolbox, drag a Web server control onto the page.

  3. Select the Web server control, and in the Properties window, click Expressions and then click the ellipsis (…) button.

    The Web server control's Expressions dialog box opens.

Bindable properties

Displays the selected control's properties with which you can use expressions. If a property does not appear in the list (such as the ID property), then you cannot use an expression to specify its value.

Expression type

Specifies how the expression gets its value.


Expressions are extensible and configurable. The list of expression types available to you might vary according to what expression builders have been installed and how the Web site has been configured.

Some example expression types that might be available include the following:

  • AppSettings   The value is stored in the Web.config file as a key/value pair in the appSettings element.

  • ConnectionStrings   The value is stored in the Web.config file in the connectionStrings element. (The connection string might be encrypted in the configuration file.) Alternatively, the value can represent the name of a provider that will generate a connection string at run time.

  • Resources   The value is stored in a .resx file.


    Only expression types defined in the machine or application Web.config file are available in the Expressions dialog box. Expressions in Web.config files in subfolders are not available.

Expression properties

Displays a list of properties that are associated with the selected expression type. Each type can have different properties that are used to complete the expression. For example, if the expression type is AppSettings, you can select the key of available items in the appSettings section of the Web.config file.

A description of each property is displayed in the box that is located directly below the Expression properties box.