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.
Note |
|---|
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 a DataList or FormView 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 ASP.NET Data Access.
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.
Note
) appears next to the property name.