<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>分页显示数据库表中的数据</title>
    <style type="text/css">
        .style1
        {
            color: #FF0000;
            font-size: xx-large;
            font-family: 华文彩云;
            font-weight: bold;
            border-left-color: #ACA899;
            border-right-color: #C0C0C0;
            border-top-color: #ACA899;
            border-bottom-color: #C0C0C0;
            background-color: #FFCC00;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 941px;" align="center">
            <tr>
                <td align="center" bgcolor="#FFCC00" >
                    <span class="style1">分页显示数据库表中的数据</span>
                    <br />
                </td>
            </tr>
            <tr>
                <td align="center" >
                    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                        BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                        CellPadding="2" ForeColor="Black" GridLines="None" Height="169px" 
                        onpageindexchanging="GridView1_PageIndexChanging" 
                        onselectedindexchanged="GridView1_SelectedIndexChanged" PageSize="8" 
                        Width="945px">
                        <PagerSettings FirstPageText="第一页" LastPageText="最后一页" 
                            Mode="NextPreviousFirstLast" NextPageText="下一页" PreviousPageText="上一页" />
                        <FooterStyle BackColor="Tan" />
                        <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                            HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                        <HeaderStyle BackColor="Tan" Font-Bold="True" />
                        <AlternatingRowStyle BackColor="PaleGoldenrod" />
                    </asp:GridView>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
