日期:2014-05-19  浏览次数:20456 次

各位大大帮帮忙
现有程序如下
.axpx
<%@   Page   language= "c# "   Codebehind= "DataGridPaging.aspx.cs "   AutoEventWireup= "false "  

Inherits= "ZZ.AspnetPaging.DataGridPaging "   %>
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN "   >
<HTML>
<HEAD>
<title> DataGridPaging </title>
<meta   content= "Microsoft   Visual   Studio   .NET   7.1 "   name= "GENERATOR ">
<meta   content= "C# "   name= "CODE_LANGUAGE ">
<meta   content= "JavaScript "   name= "vs_defaultClientScript ">
<meta   content= "http://schemas.microsoft.com/intellisense/ie5 "   name= "vs_targetSchema ">
</HEAD>
<body>
<form   id= "Form1 "   method= "post "   runat= "server ">
<TABLE   id= "Table1 "   style= "FONT-SIZE:   9pt "   cellSpacing= "1 "   cellPadding= "1 "   width= "450 "   align= "center "
border= "1 ">
<TR>
<TD> <asp:datagrid   id= "DataGrid1 "   runat= "server "   PageSize= "5 "   Width= "100% "   AllowPaging= "True ">
<HeaderStyle   Font-Size= "9pt "> </HeaderStyle>
<FooterStyle   Font-Size= "9pt "> </FooterStyle>
<PagerStyle   Visible= "False "   Font-Size= "9pt "   Mode= "NumericPages "> </PagerStyle>
</asp:datagrid> </TD>
</TR>
</TABLE>
<TABLE   id= "Table2 "   style= "FONT-SIZE:   9pt "   cellSpacing= "1 "   cellPadding= "1 "   width= "450 "   align= "center "
border= "1 ">
<TR>
<TD   style= "WIDTH:   207px ">
<asp:linkbutton   id= "LBtnFirst "   runat= "server "   CommandName= "First "> 首页 </asp:linkbutton>
<asp:linkbutton   id= "LBtnPrev "   runat= "server "   CommandName= "Prev "> 上一页 </asp:linkbutton>
<asp:linkbutton   id= "LBtnNext "   runat= "server "   CommandName= "Next "> 下一页 </asp:linkbutton>
<asp:linkbutton   id= "LBtnLast "   runat= "server "   CommandName= "Last "> 尾页 </asp:linkbutton>
</TD>
<TD> 第
<asp:literal   id= "LtlPageIndex "   runat= "server "> </asp:literal> 页   共
<asp:literal   id= "LtlPageCount "   runat= "server "> </asp:literal> 页   每页
<asp:literal   id= "LtlPageSize "   runat= "server "> </asp:literal> 条   共
<asp:literal   id= "LtlRecordCount "   runat= "server "> </asp:literal>

</TD>
</TR>
</TABLE>
</form>
</body>
</HTML>

.cs
using   System;
using   System.Collections;
using   System.ComponentModel;