October 2010
Intermediate to advanced
1920 pages
73h 55m
English
DataList ControlTo display data with the DataList control, you must supply the control with an ItemTemplate. The contents of the ItemTemplate are rendered for each data item from the data source.
For example, the page in Listing 13.6 uses a DataList to display the contents of the Movies database table. The ItemTemplate displays the values of the Title, Director, and BoxOfficeTotals columns (see Figure 13.5).
Figure 13.5. Displaying database records with the DataList control.

Listing 13.6. ShowDataList.aspx

The DataList ...