<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<webdiyer:AspNetPager ID="AspNetPager1" OnPageChanged="AspNetPager1_PageChanged" runat="server" PageSize="12" NumericButtonCount="8" ShowCustomInfoSection="right" PagingButtonSpacing="5" ShowInputBox="always" HorizontalAlign="right" SubmitButtonText="转到" NumericButtonTextFormatString="[{0}]" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
DataSet ds = blf.GetProDataSet("Get_KCDB_List", strBeginDate, strEndDate);
DataView dv = ds.Tables[0].DefaultView;
AspNetPager1.RecordCount = dv.Count;
if (dv.Count > 0)
{
PagedDataSource pds = new PagedDataSource();
pds.DataSource = dv;
pds.AllowPaging = true;
pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;
pds.PageSize = AspNetPager1.PageSize;
GridView1.DataSource = pds;
GridView1.DataBind();
//显示记录信息
AspNetPager1.CustomInfoHTML = "共有:<font color=/"blue/"><b>" + AspNetPager1.RecordCount.ToString() + "</b></font>条记录";
AspNetPager1.CustomInfoHTML += " <font color=/"red/"><b>" + AspNetPager1.CurrentPageIndex.ToString() + "</b></font>";
AspNetPager1.CustomInfoHTML += "/<font color=/"blue/"><b>" + AspNetPager1.PageCount.ToString() + "</b></font>";