ITPub博客

首页 > IT职业 > IT图书 > 分页插件jquery.pagination.js

分页插件jquery.pagination.js

IT图书 作者:liangyh 时间:2021-09-09 09:50:55 0 删除 编辑

采用Jquery无刷新分页插件jquery.pagination.js 实现无刷新分页效果

 

1.插件参数列表

图片描述

 

  http://www.dtan.so

2.页面内容:

 

 


[c-sharp] view   plaincopyprint?

  1. "C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>  

  2. html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  

  3. "http://www.w3.org/1999/xhtml">  

  4. "server">  
  5.     

    Porschev----无刷新翻页      
  6.       

  7.           

  8.          

  9.     "Style/tablecloth.css" mce_href="Style/tablecloth.css" rel="stylesheet" type="text/css" />  

  10.     "Style/pagination.css" mce_href="Style/pagination.css" rel="stylesheet" type="text/css" />  

  11.       

  12.   

  13.   
  14. "center">  
  15.   

    Posrchev----无刷新分页

      
  
  • "container">    
  •    

    "Result" cellspacing="0" cellpadding="0">            
  •             

  •   
  •                 

  •   
  •                 

  •                
  •             

  •                                                                                                
  •    

  • 编号 名称
      
  •     

    "Pagination">
      
  •   
  •   

  •    


  •  

    3.页面后台内容:


    [c-sharp] view   plaincopyprint?

    1. using System;  

    2. using System.Collections.Generic;  

    3. using System.Linq;  

    4. using System.Web;  

    5. using System.Web.UI;  

    6. using System.Web.UI.WebControls;  

    7. public partial class _Default : System.Web.UI.Page   

    8. {  

    9.     public string pageCount = string.Empty; //总条目数  

    10.     protected void Page_Load(object sender, EventArgs e)  

    11.     {  

    12.         if (!IsPostBack)  

    13.         {  

    14.            pageCount = new PagerTestBLL.PersonManager().GetPersonCount().ToString();  

    15.         }  

    16.     }  

    17. }  


     

    4.Handler中的内容:


    [c-sharp] view   plaincopyprint?

    1. "C#" Class="PagerHandler" %>  

    2. using System;  

    3. using System.Web;  

    4. using System.Collections.Generic;  

    5. using System.Text;  

    6. public class PagerHandler : IHttpHandler {  

    7.       

    8.     public void Proce***equest (HttpContext context) {  

    9.         context.Response.ContentType = "text/plain";  

    10.         string str = string.Empty;  

    11.           

    12.         //具体的页面数  

    13.         int pageIndex;  

    14.         int.TryParse(context.Request["pageIndex"], out pageIndex);  

    15.         //页面显示条数  

    16.         int size = Convert.ToInt32(context.Request["pageSize"]);  

    17.           

    18.         if (pageIndex == 0)  

    19.         {  

    20.             pageIndex = 1;  

    21.         }  

    22.           

    23.         int count;  

    24.         List list = new PagerTestBLL.PersonManager().GetAllPerson(size, pageIndex, "", out count);  

    25.           

    26.         StringBuilder sb = new StringBuilder();  

    27.         foreach (PagerTestModels.Person p in list)  

    28.         {              

    29.             sb.Append(" ");  

    30.             sb.Append(p.Id.ToString());  

    31.             sb.Append("

    32. ");  
    33.             sb.Append(p.Name);  

    34.             sb.Append("

    35. ");  

    36.         }  

    37.         str = sb.ToString();  

    38.         context.Response.Write(str);       

    39.     }  

    40.    

    41.     public bool IsReusable {  

    42.         get {  

    43.             return false;  

    44.         }  

    45.     }  

    46. }  


     

    5.实现效果图:

    图片描述

    来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2260/viewspace-2813299/ ,如需转载,请注明出处,否则将追究法律责任。

    上一篇: Tab页界面,用jQuery及Ajax技术实现
    下一篇: 数据库事务基础知识
    请登录后发表评论 登录
    全部评论

    注册时间:2019-04-16

    最新文章