分页插件jquery.pagination.js

您所在的位置:网站首页 分页插件pagination 分页插件jquery.pagination.js

分页插件jquery.pagination.js

2022-03-26 12:28| 来源: 网络整理| 查看: 265

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

 

1.插件参数列表

参数列表

 

  http://www.dtan.so

2.页面内容:

 

 

[c-sharp] view   plaincopyprint?

  

  

  

  

    Porschev----无刷新翻页      

      

          

         

      

      

      

  

  

  

  Posrchev----无刷新分页  

  

    

               

              

                编号  

                名称               

                                                                                                           

     

      

  

  

   

 

3.页面后台内容:

[c-sharp] view   plaincopyprint?

using System;  

using System.Collections.Generic;  

using System.Linq;  

using System.Web;  

using System.Web.UI;  

using System.Web.UI.WebControls;  

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

{  

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

    protected void Page_Load(object sender, EventArgs e)  

    {  

        if (!IsPostBack)  

        {  

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

        }  

    }  

}  

 

4.Handler中的内容:

[c-sharp] view   plaincopyprint?

  

using System;  

using System.Web;  

using System.Collections.Generic;  

using System.Text;  

public class PagerHandler : IHttpHandler {  

      

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

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

        string str = string.Empty;  

          

        //具体的页面数  

        int pageIndex;  

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

        //页面显示条数  

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

          

        if (pageIndex == 0)  

        {  

            pageIndex = 1;  

        }  

          

        int count;  

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

          

        StringBuilder sb = new StringBuilder();  

        foreach (PagerTestModels.Person p in list)  

        {              

            sb.Append("");  

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

            sb.Append("");  

            sb.Append(p.Name);  

            sb.Append("");  

        }  

        str = sb.ToString();  

        context.Response.Write(str);       

    }  

   

    public bool IsReusable {  

        get {  

            return false;  

        }  

    }  

}  

 

5.实现效果图:

实现效果图



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3