zoukankan      html  css  js  c++  java
  • repeater 设置分页

    webconfig:
      <system.web>
        <pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID">
          <controls>
            <add tagPrefix="webdiyer" namespace="Wuqi.Webdiyer" assembly="AspNetPager" />
          </controls>
        </pages>
      </system.web>
     
    前台:
    <%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
            .pull-right {
                float: right !important;
                500px;
                font-size: 16px;
                margin-right: 20px;
                600px;
                margin-top: 15px;
                position: static;
            }
            <div class="pull-right">
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" Width="100%" NumericButtonCount="6" UrlPaging="true" 
    NumericButtonTextFormatString="[{0}]" CustomInfoHTML="第 <font color='red'><b>%CurrentPageIndex%</b></font> 页 共 %PageCount% 页 显
    示 %StartRecordIndex%-%EndRecordIndex% 条" ShowCustomInfoSection="left"
                    FirstPageText="首页" LastPageText="末页" NextPageText="下页" PrevPageText="上页" Font-Names="Arial" 
    BackColor="#F8B500" AlwaysShow="true" ShowInputBox="Always" SubmitButtonText="跳转" SubmitButtonStyle="botton" 
    OnPageChanged="AspNetPager1_PageChanged">
                </webdiyer:AspNetPager>
            </div>
    后台
        PagedDataSource pds = new PagedDataSource();
                pds.DataSource = dv;
                pds.AllowPaging = true;
                pds.PageSize = 5;
                AspNetPager1.RecordCount = dv.Count;
                AspNetPager1.PageSize = pds.PageSize;
                rptView.DataSource = pds;
                rptView.DataBind();
        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {
            pds.CurrentPageIndex = AspNetPager1.CurrentPageIndex - 1;//索引同步
            rptView.DataSource = pds;
            rptView.DataBind();
        }
  • 相关阅读:
    CRF++条件随机场
    list 函数
    转:Java Map 排序定义
    C#统计文本单词个数2
    转:求多边形的面积 算法几何
    C#统计单词词频
    C#动态数组ArrayList
    转:java写一个方法实现统计一条英文语句忠每个单词的个数
    C#统计文本单词的个数
    统计文本单词个数,并个数大小按序排列 C#
  • 原文地址:https://www.cnblogs.com/ljj4490/p/5718289.html
Copyright © 2011-2022 走看看