<% @ Page Language = " C# " AutoEventWireup = " true " CodeFile = " Default.aspx.cs " Inherits = " _Default " %> <! DOCTYPE html PUBLIC " -//W3C//DTD XHTML 1.1//EN " " http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd " > < html xmlns = " http://www.w3.org/1999/xhtml " > < head runat = " server " > < title > Untitled Page </ title > </ head > < body > < form id = " form1 " runat = " server " > < div > < asp:SqlDataSource ID = " SqlDataSource1 " runat = " server " ConnectionString = " <%$ ConnectionStrings:pubsConnectionString %> " SelectCommand = " SELECT * FROM [authors] " ></ asp:SqlDataSource > </ div > < asp:Repeater ID = " Repeater1 " runat = " server " DataSourceID = " SqlDataSource1 " > < HeaderTemplate > < table > < tr > < td > 这是一个头模板 </ td > </ tr > </ HeaderTemplate > < ItemTemplate > < tr > < td > < strong > < span style = " font-size: 24pt; color: #000099; font-family: Trebuchet MS " > < a href = ' default2.aspx?id=<%# Eval("au_id") %> ' > <% # Eval( " au_id " ) %></ a > </ span > </ strong > </ td > </ tr > </ ItemTemplate > < AlternatingItemTemplate > < tr > < td > < span style = " font-size: 36pt; color: #66ff66; font-family: Gulim; background-color: #ffffff " >< strong ><% # Eval( " au_lname " ) %></ strong ></ span ></ td > </ tr > </ AlternatingItemTemplate > < SeparatorTemplate > < tr > < td >< hr /></ td > </ tr > </ SeparatorTemplate > < FooterTemplate > < tr > < td > 这是一个脚模板 </ td > </ tr > </ table > </ FooterTemplate > </ asp:Repeater > < br /> </ form > </ body > </ html >