<%@ Page language="c#" Codebehind="DataGridPager.aspx.cs" AutoEventWireup="false" Inherits="CommonFunction.DataGridPager" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<meta content="Visual Basic 7.0" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="Form1" runat="server">
			<TABLE id="Table1" style="Z-INDEX: 101; LEFT: 32px; WIDTH: 480px; POSITION: absolute; TOP: 24px; HEIGHT: 279px"
				cellSpacing="1" cellPadding="1" width="480" border="0">
				<tr>
					<td align="center">
						<h2>DataGrid分页的例子</h2>
					</td>
				</tr>
				<TR>
					<TD style="HEIGHT: 206px" vAlign="top"><asp:datagrid id="DataGridPage" runat="server" GridLines="Horizontal" BackColor="White" BorderStyle="None"
							Width="480px" AllowPaging="True" PageSize="5" PagerStyle-Mode="NumericPages" PagerStyle-HorizontalAlign="Right" BorderColor="#E7E7FF"
							BorderWidth="1px" CellPadding="3" Font-Name="Verdana" HeaderStyle-BackColor="#aaaadd" AlternatingItemStyle-BackColor="#eeeeee"
							HorizontalAlign="Center" AutoGenerateColumns="False">
							<SelectedItemStyle Font-Bold="True" ForeColor="#F7F7F7" BackColor="#738A9C"></SelectedItemStyle>
							<AlternatingItemStyle BackColor="#F7F7F7"></AlternatingItemStyle>
							<ItemStyle ForeColor="#4A3C8C" BackColor="#E7E7FF"></ItemStyle>
							<HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="#F7F7F7" BackColor="#4A3C8C"></HeaderStyle>
							<FooterStyle ForeColor="#4A3C8C" BackColor="#B5C7DE"></FooterStyle>
							<Columns>
								<asp:BoundColumn DataField="lastname" HeaderText="lastname">
									<HeaderStyle Width="480px"></HeaderStyle>
								</asp:BoundColumn>
								<asp:BoundColumn DataField="firstname" HeaderText="firstname"></asp:BoundColumn>
							</Columns>
							<PagerStyle HorizontalAlign="Right" ForeColor="#4A3C8C" BackColor="#E7E7FF" Mode="NumericPages"></PagerStyle>
						</asp:datagrid></TD>
				</TR>
				<TR>
					<TD align="right"><asp:label id="lblPageCount" runat="server"></asp:label><asp:label id="lblCurrentIndex" runat="server"></asp:label><asp:linkbutton id="btnFirst" onclick="PageButtonClick" runat="server" Font-Name="verdana" CommandArgument="0">最首页</asp:linkbutton><asp:linkbutton id="btnPrev" onclick="PageButtonClick" runat="server" CommandArgument="prev">前一页</asp:linkbutton><asp:linkbutton id="btnNext" onclick="PageButtonClick" runat="server" CommandArgument="next">下一页</asp:linkbutton><asp:linkbutton id="btnLast" onclick="PageButtonClick" runat="server" CommandArgument="last">最后页</asp:linkbutton></TD>
				</TR>
			</TABLE>
		</form>
	</body>
</HTML>
