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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.