Formatting the Repeater

Most of the formatting that can be performed by the Repeater list control is done within the various templates supported by the control. In other words, the formatted output of the Repeater is only as good as your skills in HTML, because you design and implement these templates yourself. Nonetheless, by using the provided template types along with some smart CSS, you can achieve some good-looking results easily.

In the preceding hour, we took a look at formatting the Repeater output using the ItemTemplate. As you recall, this enabled us to insert data fields returned from our data source into some static HTML content. In addition to the ItemTemplate, the Repeater also supports a HeaderTemplate, FooterTemplate, AlternatingItemTemplate ...

Get Sams Teach Yourself ADO.NET in 24 Hours 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.