zoukankan      html  css  js  c++  java
  • AspNetPager

    AspNetPager使用方法
    引入dll
    <%@ Register assembly="AspNetPager" namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
    拖入控件

    bindList():
    //数据总数
    pager.RecordCount = int ;
    //repeater绑定数据源
    FlowList.DataSource =  datatable;
    //repeater绑定数据
    FlowList.DataBind();
    //页change行为
            protected void pager_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
            {
                pager.CurrentPageIndex = e.NewPageIndex;
                bindList();
            }

    前台:
          <webdiyer:AspNetPager ID="pager" runat="server" CssClass="pages"
                CurrentPageButtonClass="cpb" NextPageText="下一页" PrevPageText="上一页"
                FirstPageText="首页" LastPageText="尾页" SubmitButtonText="确 定"
                ShowInputBox="Always" TextBeforeInputBox="直接到" TextAfterInputBox="页"
                                                    AlwaysShow="True" PageSize="25"
                onpagechanging="pager_PageChanging">
                                                </webdiyer:AspNetPager>

    protected void PagerBind() {
                AspNetPager1.RecordCount = BLLPortal.GetContentTableBySecondClassID(ClassID, 50000, "ID desc").Rows.Count;
                SecondList.DataSource = BLLPortal.GetContentTableBySecondClassID2(ClassID, AspNetPager1.PageSize, AspNetPager1.CurrentPageIndex, "ID desc");
                SecondList.DataBind();
            }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
            {
                AspNetPager1.CurrentPageIndex = e.NewPageIndex;
                PagerBind();
            }

  • 相关阅读:
    如何更改Linux yum源?
    Vsftp设置为PASV mode(被动模式传送)
    CentOS 6.5 yum安装配置lnmp服务器(Nginx+PHP+MySQL)
    centos6.3搭建FTP服务器图文教程
    Linux关闭/开启防火墙命令
    linux下火狐浏览器安装flash player插件
    判断网站织梦DedeCms版本的方法
    PHP获取当前url路径的函数及服务器变量
    leetcode 205 Isomorphic Strings
    leetcode 70 Climbing Stairs
  • 原文地址:https://www.cnblogs.com/handsomer/p/3678237.html
Copyright © 2011-2022 走看看