界面:
1 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 2 3 <!DOCTYPE html> 4 5 <html xmlns="http://www.w3.org/1999/xhtml"> 6 <head runat="server"> 7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 8 <title></title> 9 </head> 10 <body> 11 <form id="form1" runat="server"> 12 <div> 13 <asp:Repeater ID="Repeater1" runat="server"> 14 <HeaderTemplate> 15 <table style="background-color: blue; width: 100%; text-align:center"> 16 <thead> 17 <tr style="color: white;"> 18 <td>编号</td> 19 <td>名称</td> 20 <td>品牌</td> 21 <td>上市时间</td> 22 <td>油耗</td> 23 <td>动力</td> 24 <td>排量</td> 25 <td>价格</td> 26 <td>图片</td> 27 </tr> 28 </thead> 29 <tbody> 30 </HeaderTemplate> 31 <ItemTemplate> 32 <tr style="background-color: #808080"> 33 <td><%#Eval("Code") %></td> 34 <td><%#Eval("Name") %></td> 35 <td><%#Eval("Brand") %></td> 36 <td><%#Eval("Time") %></td> 37 <td><%#Eval("Oil") %></td> 38 <td><%#Eval("Power") %></td> 39 <td><%#Eval("Exhaust") %></td> 40 <td><%#Eval("Price") %></td> 41 <td><%#Eval("Pic") %></td> 42 </tr> 43 </ItemTemplate> 44 <FooterTemplate> 45 </tbody> 46 </table> 47 </FooterTemplate> 48 </asp:Repeater> 49 <div style="width: 50%; position: relative; float: left; height: 25px; line-height: 25px; text-indent: 20px;"> 50 共 51 <asp:Label ID="Label_Sum" runat="server" Text="Label"></asp:Label> 52 条记录,共 53 <asp:Label ID="Label_Maxpage" runat="server" Text="Label"></asp:Label> 54 页,第 55 <asp:Label ID="Label_Nowpage" runat="server" Text="Label"></asp:Label> 56 页|每页 57 <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="true" ></asp:DropDownList> 58 条记录 59 </div> 60 <div style="width: 30%; position: relative; float: right; height: 25px; line-height: 25px;"> 61 <asp:LinkButton ID="btn_First" runat="server">首页</asp:LinkButton>  62 <asp:LinkButton ID="btn_Prev" runat="server">上一页</asp:LinkButton>  63 <asp:LinkButton ID="btn_Next" runat="server">下一页</asp:LinkButton>  64 <asp:LinkButton ID="btn_Last" runat="server">尾页</asp:LinkButton>  65 <asp:DropDownList ID="DropDownList1" runat="server"></asp:DropDownList> 66 <asp:Button ID="Button1" runat="server" Text="跳转" /> 67 </div> 68 </div> 69 </form> 70 </body> 71 </html>