DataList Control

The DataList control is used to display data that is in some sort of collection. As with the Repeater, the DataList supports a number of templates. These can be seen in Table 10.2. The DataList control has a richer feature set than the Repeater control. It supports selecting and editing. If you use a DataList control, you must at least define an ItemTemplate. Within the ItemTemplate, you can set the attributes with which the DataList is to render the data. The other templates determine other aspects of the DataList appearance.

Table 10.2. The DataList Templates
Template Name Description
AlternatingItemTemplate If defined, provides the content and layout for alternating items in the DataList. If not defined, ItemTemplate is used. ...

Get Special Edition Using® Microsoft® ASP.NET 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.