Chapter 13. Designing the ListView and Other Templated Controls

In This Chapter

  • Understanding templates in databound controls

  • Building ListView templates by hand

  • Paging with the DataPager control

ASP.NET ships with a good selection of databound controls, including the GridView, DataGrid (yes, it's still there), DetailsView, FormView, DataList, Repeater, and ListView. The advanced controls include AutoFormat wizards that apply basic schemes and layouts, often by customizing built-in templates. These templates determine how the control renders specific elements, such as the header, data rows, alternate rows, and the footer. This chapter tells you what you need to know about templates so that you can produce the look and behavior you want.

This project uses Julie's DVD database from Chapter 3. The database has very few fields, making the steps shorter. If you don't want to create the database manually, you can download it and the SQL script from this book's Web site. Actually, you can use any SQL Server database you want, but you need to adjust details, such as field names.

Get ASP.NET 3.5 For Dummies® 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.