O'Reilly logo

ASP.NET Developer's JumpStart by Ken Getz, Paul D. Sheriff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding the Full ItemTemplate

Unlike the DataGrid control (but more like the Repeater), you must supply at least a single HTML template in order to use the DataList control. As you saw in the previous section, you must supply layout information in the ItemTemplate. Creating templates for the DataList control is much like creating templates for the DataGrid control—it's up to you to supply the appropriate HTML within each DataList template to render the correct user interface. Although you only have to supply a single template, the DataList control supports all the templates shown in Table 19.3.

Table 19.3. You Can Define All These Templates for the DataList Control
Template Name Description
AlternatingItemTemplate If defined, this template provides ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required