分页核心技术
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="PagerT._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>
<LINK rel="stylesheet" type="text/css" href="CSS/style.css">
</head>
<body>
<form id="form1" runat="server">
<div>
<webdiyer:aspnetpager id="AspNetPager2" runat="server" horizontalalign="Center" onpagechanged="AspNetPager1_PageChanged"
width="100%" PageIndexBoxStyle="width:19px" FirstPageText="【首页】" LastPageText="【尾页】" NextPageText="【后页】" PrevPageText="【前页】" NumericButtonTextFormatString="【{0}】"
TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到第" CustomInfoHTML="Page <font color='red'><b>%CurrentPageIndex%</b></font> of %PageCount% Order %StartRecordIndex%-%EndRecordIndex%"></webdiyer:aspnetpager>
</div><br/>
<div>
<webdiyer:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="Center" Width="100%" PageIndexBoxType="DropDownList" OnPageChanged="AspNetPager1_PageChanged" NumericButtonTextFormatString="<{0}>">
</webdiyer:AspNetPager>
</div><br/>
<div>
<webdiyer:AspNetPager ID="AspNetPager6" runat="server" HorizontalAlign="Center" Width="100%" PageIndexBoxType="DropDownList" OnPageChanged="AspNetPager1_PageChanged" NumericButtonTextFormatString="-{0}-">
</webdiyer:AspNetPager>
</div><br/>
<div>
<webdiyer:aspnetpager id="AspNetPager7" runat="server" PagingButtonSpacing="8px" onpagechanged="AspNetPager1_PageChanged"
showcustominfosection="Right" CustomInfoHTML="总记录数:%RecordCount%,总页数:%PageCount%,当前为第%CurrentPageIndex%页" urlpaging="True" width="100%" LayoutType="Table" ShowNavigationToolTip="true" UrlPageIndexName="pageindex"></webdiyer:aspnetpager>
</div><br/>
<div>
<webdiyer:aspnetpager id="AspNetPager8" runat="server" horizontalalign="Center" onpagechanged="AspNetPager1_PageChanged" ShowPageIndexBox="Always" PageIndexBoxType="DropDownList" TextBeforePageIndexBox="转到第" TextAfterPageIndexBox="页" PageSize="16"
width="100%"></webdiyer:aspnetpager>
<asp:RadioButtonList ID="rbl_boxtype" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rbl_boxtype_SelectedIndexChanged" RepeatDirection="Horizontal" RepeatLayout="Flow">
<asp:ListItem>文本框输入</asp:ListItem>
<asp:ListItem Selected="true">下拉框选择</asp:ListItem>
</asp:RadioButtonList>
</div><br/>
<div>
<webdiyer:aspnetpager id="AspNetPager9" runat="server" horizontalalign="Center" PagingButtonSpacing="8px" onpagechanged="AspNetPager1_PageChanged"
urlpaging="True" UrlPageSizeName="pagesize" UrlPageIndexName="pageindex" width="100%" LayoutType="Table" ShowNavigationToolTip="true"></webdiyer:aspnetpager>
<div style="width:100%;text-align:right">
每页显示记录数:<a href="Default.aspx?pagesize=10">10条</a>
<a href="Default.aspx?pagesize=20">20条</a>
<a href="Default.aspx?pagesize=50">50条</a>
</div>
</div><br/>
<div>
<webdiyer:aspnetpager id="AspNetPager10" runat="server" RecordCount="888"
Width="100%"></webdiyer:aspnetpager>
<asp:CheckBox ID="ck_disbtn" runat="server" Checked="True" Text="ShowDisabledButtons" AutoPostBack="True" /><br />
<asp:CheckBox ID="ck_firstlast" runat="server" Checked="True" Text="ShowFirstLast" AutoPostBack="True" /><br />
<asp:CheckBox ID="ck_prevnext" runat="server" Checked="True" Text="ShowPrevNext" AutoPostBack="True" /><br />
<asp:CheckBox ID="ck_pageindex" runat="server" Checked="True" Text="ShowPageIndex" AutoPostBack="True" />
</div><br/>
<div>
<webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager3" runat="server" RecordCount="228"
FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div><br/>
<div>
<webdiyer:AspNetPager CssClass="paginator" CurrentPageButtonClass="cpb" ID="AspNetPager4" runat="server" RecordCount="228"
FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div><br/>
<div>
<webdiyer:AspNetPager CssClass="paginatorb" CurrentPageButtonClass="cpb" ID="AspNetPager11" runat="server" RecordCount="228"
FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页">
</webdiyer:AspNetPager>
</div><br/>
<div>
<webdiyer:AspNetPager CssClass="anpager" CurrentPageButtonClass="cpb" ID="AspNetPager5" runat="server" RecordCount="228"
FirstPageText="首页" LastPageText="尾页" NextPageText="后页" PrevPageText="前页">
</webdiyer:AspNetPager>
</div><br/>
</form>
</body>
</html>
详细的示例代码下载地址: http://download.csdn.net/source/1882909
更多了解请联系: kfu_lufazhan@126.com