首页 > IT职业 > IT图书 > 分页插件jquery.pagination.js
采用Jquery无刷新分页插件jquery.pagination.js 实现无刷新分页效果
1.插件参数列表

http://www.dtan.so
2.页面内容:
[c-sharp] view plaincopyprint?
"C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
"http://www.w3.org/1999/xhtml">
"Style/tablecloth.css" mce_href="Style/tablecloth.css" rel="stylesheet" type="text/css" />
"Style/pagination.css" mce_href="Style/pagination.css" rel="stylesheet" type="text/css" />
| 编号 | 名称 |
|---|
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?
"C#" Class="PagerHandler" %>
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
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.实现效果图:

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