Formatting the DataList Control

The DataList control includes a rich set of properties that you can use to format the HTML rendered by the control. If you want to associate Cascading Style Sheet (CSS) rules with different elements of the DataList, you can take advantage of any of the following properties:

CssClass Enables you to associate a CSS class with the DataList.

AlternatingItemStyle Enables you to format every other row of DataList.

EditItemStyle Enables you to format the DataList row selected for editing.

FooterStyle Enables you to format the footer row of DataList.

HeaderStyle Enables you to format the header row of DataList.

ItemStyle Enables you to format each row displayed by DataList.

SelectedItemStyle Enables ...

Get ASP.NET 4 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.