How Does the Repeater Control Work?

In order for the Repeater control to display data, you must provide two things: a DataSource property value (indicating the source of the data), and at least one HTML template (indicating how the control should display data from its data source).

Displaying Data

So that the Repeater can display data (its only reason for existence), you must set the control's DataSource property. You can use a DataTable object (as you'll see in the example later in the chapter) or any other object that supports the IEnumerable interface, including Array, ArrayList, DataView, HashTable, Queue, and more.

The Repeater control provides no built-in support for displaying data. You must tell the control what you want it to do with ...

Get ASP.NET Developer's JumpStart now with O’Reilly online learning.

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