1 < ASP: Repeater
2 ID = " Rptauthors "
3 Runat = " Server " >
4
5 < Headertemplate >
6 < Table border = 1 Cellpadding = 4 >
7 < Tr bgcolor = " # Eeeeee " >
8 < Th > First name </ Th >
9 < Th > Last name </ Th >
10 < Th > Phone </ Th >
11 </ Tr >
12 </ Headertemplate >
13
14 < Itemtemplate >
15 < Tr >
16 < TD > <% # Databinder. eval (container. dataitem, " Au_fname " ) %> </ TD >
17 < TD > <% # Databinder. eval (container. dataitem, " Au_lname " ) %> </ TD >
18 < TD > <% # Databinder. eval (container. dataitem, " Phone " ) %> </ TD >
19 </ Tr >
20 </ Itemtemplate >
21
22 < Alternatingitemtemplate >
23 < Tr bgcolor = " Lightyellow " >
24 < TD > <% # Databinder. eval (container. dataitem, " Au_fname " ) %> </ TD >
25 < TD > <% # Databinder. eval (container. dataitem, " Au_lname " ) %> </ TD >
26 < TD > <% # Databinder. eval (container. dataitem, " Phone " ) %> </ TD >
27 </ Tr >
28 </ Alternatingitemtemplate >
29
30 < Footertemplate >
31 </ Table >
32 </ Footertemplate >
33
34 </ ASP: Repeater >
Note:
"Au_fname", "au_lname", "phone" is the name of a sqldatareader column, which is bound to the Repeater control.