zoukankan      html  css  js  c++  java
  • AspNetPager2.0.dll组件的使用

       现在想想以前刚学这些知识的时候就应该写在博客上,这样既可以及时的复习和可以不受某台电脑约束(虽然网上很多此类资料,但还是看自己的学习记录快易懂)。不写下来很多东西不用的话就渐渐淡了,忘了。又得重新温习。继续总结吧:

     第一、在项目的bin文件中添加组件的引用。

     第二、在aspx页面添加注册指令:<%@ Register Assembly="AspNetPager2.0" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>。

     第三、分页控件的页面调用: 

          <table width="100%" border="0" cellspacing="0" cellpadding="0">
               <tr>
                     <td style="height: 29px;">
                           <webdiyer:AspNetPager ID="anpList" runat="server" AlwaysShow="True" FirstPageText="首页"
                               CustomInfoHTML="共%RecordCount%条记录,当前第%CurrentPageIndex%/%PageCount%页,
                                每页%PageSize%条记录" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页" 

                                 ShowCustomInfoSection="Left" UrlPaging="true" PageSize="150" UrlPageIndexName="page">
                            </webdiyer:AspNetPager>
                      </td>
               </tr>
         </table>
                              

     第四:绑定数据源:

            this.anpList.RecordCount = query.Count();
            int curr_page_index = this.anpList.CurrentPageIndex;
            if (Request.QueryString["page"] != null && StringHandler.IsNumeric(Request.QueryString["page"].ToString()))
            {
                curr_page_index = Convert.ToInt32(Request.QueryString["page"]);
            }
            this.rptList.DataSource = query.Skip((curr_page_index - 1) * this.anpList.PageSize).Take(this.anpList.PageSize);
            this.rptList.DataBind();

  • 相关阅读:
    JVM常用参数设置
    Jstat在分析java的内存GC时的应用
    jstack来分析linux服务器上Java应用服务性能异常
    linux 远程连接服务器ftp命令整理
    LR11中webservice协议的性能测试应用
    Windbg在.net性能问题排查hang情况的应用思路
    Windbg基本命令应用总结
    LR11直接对数据库访问操作方法在性能测试中的应用总结
    BenchmarkSQL v5.0测试达梦数据库
    SSH登录时间久,登录后报错:'abrt-cli status' timed out
  • 原文地址:https://www.cnblogs.com/professional-NET/p/4675046.html
Copyright © 2011-2022 走看看