DataBindings Dialog Box
Displays a list of properties for the control and enables you to specify the data source that properties are bound to. Use the DataBindings dialog box to bind single-value properties (such as the BackColor or Width properties) to the control.
This dialog box is not used to specify the list of records or objects to be displayed by multi-record controls, such as the Repeater, DataList, DataGrid, ListBox, CheckBoxList, and RadioButtonList controls. To specify what records those controls should display, configure a data source or set their DataSource and DataMember properties.
The DataBindings dialog box helps you create a data-binding expression that specifies what a property is bound to. You can make selections from a list of available data sources, which creates the data-binding expression for you. Alternatively, you can create a custom expression.To open the DataBindings dialog box
In Visual Web Developer, create or open an existing .aspx page and then switch to Design view.
From the Data tab of the Toolbox, drag aor control onto the page.
Right-click the control and click Show Smart Tag.
The Tasks window is displayed for the control.
Configure a data source for the control. The DataBindings dialog box is not available unless a data source is configured. For more information, see.
In the Tasks window for the control, click Edit Templates.
The Tasks window switches to Template Editing Mode.
In the Display drop-down list, select ItemTemplate.
The ItemTemplate designer is displayed in the control with three editable fields: Description, Title, and URL.
Right-click any of the editable fields and click Show Smart Tag.
The Label Tasks window is displayed.
Click Edit DataBindings.
- Bindable properties
Displays a list of all of the properties for the selected control that can be bound to a data source. If a property has already been bound, a data-binding glyph ( ) appears next to the property name.
- Field binding
Indicates that you want to bind to an available data source. When this option is selected, the Bound to drop-down list of data items is enabled, and you can select an item to bind to.
When you select an item to bind to, a data-binding expression is generated. It is displayed in the Code expression box, even though that box is disabled.
Enables you to select a string format specifier to use for formatting property values. Format specifiers are added into the data binding expression.
Displays sample data with the format option applied.
- Custom binding
Indicates that you want to edit the data-binding expression. The Code expression editing box is enabled, and you can create a new expression or edit the one generated by the dialog box. For more information, see.
The dialog box does not check that the expression you create is valid.