List Controls

You can use several different types of ASP.NET server controls to display data in list form. All controls have in common that they are bound to a data source and that they produce one item—an entry—for each record in the data source.

This section shows you how to use the Repeater and DataList controls. The one that’s not mentioned is the Table control—most readers already use tables, and the control that’s offered doesn’t go much beyond HTML tables.

Using the Repeater Control

The Repeater ASP.NET server control is a data-bound container control that produces a list of individual items. You use templates to define the layout of individual items. When the page is run, the control repeats the layout for each item in the data source. ...

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.