Using the DataList Control's Properties
You'll want to format the contents of your DataList control, setting fonts, colors, and borders; to make that easier, the DataGrid control supports a named style for each template. (For example, the ItemStyle element in the page's HTML contains the formatting information for the ItemTemplate element; the AlternatingItemStyle element corresponds to the AlternatingItemTemplate element, and so on.) Although you can set each individual property for each template, that can get tedious. Instead, you'll most likely want to start with the automatic formatting provided by the control.
In this section, you'll add these features to your DataList control:
Format the DataList control, setting up different colors for ...
Get ASP.NET Developer's JumpStart 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.