分页核心技术之项目实例

分页核心技术

 

<%@ 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%&nbsp;&nbsp;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>&nbsp;&nbsp;
        <a href="Default.aspx?pagesize=20">20条</a>&nbsp;&nbsp;
        <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

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

笨鸟慢飞ing

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值