使用方法:
先把mvcpager.dll引用加入mvc项目 下载路径在本文末尾

前台代码

前台:
@{
Layout = null;
}
@using Webdiyer.WebControls.Mvc
@model PagedList<string>
<!DOCTYPE html> <html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title> <link href="~/Content/css_pager.css" rel="stylesheet" /> </head>
<body>
<div>
@foreach (var item in Model)
{
@item<br />
}
</div>
<div style="text-align:center;">
@Html.Pager(Model, new PagerOptions { PageIndexParameterName = "pageIndex", ContainerTagName = "ul", PrevPageText = "上页", NextPageText = "下页", FirstPageText = "首页", LastPageText = "尾页", CssClass = "pagination", PagerItemsSeperator = "", CurrentPagerItemWrapperFormatString = "<li class=\"active\"><a href=\"#\">{0}</a></li>", PagerItemWrapperFormatString = "<li>{0}</li>" }, new { id = "bootstrappager", @class = "pagination" })
<!-- @class 可为pagination或pager 样式可自行修改样式表-->
</div>
</body>
</html>

后台代码

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Webdiyer.WebControls.Mvc;
namespace MvcApplication6.Controllers
{
public class HomeController : Controller
{
//
// GET: /Home/ public ActionResult Index(int pageIndex=, int pageSize=)
{
List<string> list = new List<string>(){
"a",
"b",
"c",
"d"
};
return View(list.ToPagedList(pageIndex, pageSize));
} }
}
@Html.Pager(Model, new PagerOptions { PageIndexParameterName = "pageIndex", ContainerTagName = "ul", PrevPageText = "上页", NextPageText = "下页", FirstPageText = "首页", LastPageText = "尾页", CssClass = "pagination", PagerItemsSeperator = "", CurrentPagerItemWrapperFormatString = "<li class=\"active\"><a href=\"#\">{0}</a></li>", PagerItemWrapperFormatString = "<li>{0}</li>" }, new { id = "bootstrappager", @class = "pagination" })

样式更改:class为pager或pagination

如图:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAh0AAAEHCAIAAACFp2PQAAAWoElEQVR4Ae3cS4wcdX4H8JqxIY7EwwathMLKr4OltVgO4IMNslC8UTRSJF8slsPGrLPLyfEtMpcRy0u+2FfiE5sA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F9/b2fuzu9W8aN/QEb+9ybymjDwUsh0JUzOBgeGN62Ns7GIwWon9498v9/ZuNafOgt7vbO7y9ffKNY8Y/QIwX4sfdAM3+Xt6tycNk13m4WXSzv7d7+6SGn2B//7Y395YCrIJCVEu4Q2nyXqbD/eut7e0/wp9ONUshRpY+6WHvbh+uyL0fjT7aXcOWvicNGKcQlTL6rv/G/a3nyG6ofMvbPOiN7P+5e7T7N47JezD5wPXYtnt0yEnDjDyL20Lc/9GhQsAaKUSljOycubt17DjEzVv4obfzY0cvJt44LAzDzIWYMMyUQgwfF7k9SnHQVAhYC4WolAc/Q9zbwxPs8BnZ6T/1xiwrX4ho19YshYifYLQUYPkUoloeOg7xcCEmbIWjGyed5Dq9EIODvesj0hOHmXLoYlIJFALWQCEq5oFzmfIN/dgep8HB3uiBgf1+Ft94a8o1EMG5TLd7qIYHmDBMdu+8pvxwSHQuU5Zlg4P9qeUAlkghqmfq9RDDu/L3+gcje29GDhdnE27MsuyhS+SCzxB7e6OHDW5/GA2TZdl1JG4uehj9tBEdHVEIWAOF4L7pO5fGfrqIbffhvovgYAMpBCOKfHrIlSrE4f7QXXw+gA2lEMypZCHGzmcFNo5CABBTCABiCgFATCEAiCkEADGFACCmEADEFAKAmEIAEFMIAGIKAUBMIQCIKQQAMYUAIKYQAMQUAoCYQgAQUwgAYgoBQEwhAIgpBAAxhQAgphAAxBQCgJhCABBTCABiCgFATCEAiCkEADGFACCmEADEFAKAmEIAEFMIAGIKAUBMIQCIKQQAMYUAIKYQAMQUAoCYQgAQUwgAYgoBQEwhAIgpBAAxhQAgphAAxBQCgJhCABBTCABiCgFATCEAiP0fjNswdMoUGHAAAAAASUVORK5CYII=" alt="" />

下载路径: http://files.cnblogs.com/files/gaocong/MvcPager.rar

样式文件:

.pagination {
border-radius: 4px;
display: inline-block;
margin: 20px 0;
padding-left:;
}
.pagination > li {
display: inline;
}
.pagination > li > a, .pagination > li > span {
background-color: #fff;
border: 1px solid #ddd;
color: #337ab7;
float: left;
line-height: 1.42857;
margin-left: -1px;
padding: 6px 12px;
position: relative;
text-decoration: none;
}
.pagination > li:first-child > a, .pagination > li:first-child > span {
border-bottom-left-radius: 4px;
border-top-left-radius: 4px;
margin-left:;
}
.pagination > li:last-child > a, .pagination > li:last-child > span {
border-bottom-right-radius: 4px;
border-top-right-radius: 4px;
}
.pagination > li > a:hover, .pagination > li > span:hover, .pagination > li > a:focus, .pagination > li > span:focus {
background-color: #eee;
border-color: #ddd;
color: #23527c;
z-index:;
}
.pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
background-color: #337ab7;
border-color: #337ab7;
color: #fff;
cursor: default;
z-index:;
}
.pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus {
background-color: #fff;
border-color: #ddd;
color: #777;
cursor: not-allowed;
}
/*.pagination-lg > li > a, .pagination-lg > li > span {
font-size: 18px;
line-height: 1.33333;
padding: 10px 16px;
}
.pagination-lg > li:first-child > a, .pagination-lg > li:first-child > span {
border-bottom-left-radius: 6px;
border-top-left-radius: 6px;
}
.pagination-lg > li:last-child > a, .pagination-lg > li:last-child > span {
border-bottom-right-radius: 6px;
border-top-right-radius: 6px;
}
.pagination-sm > li > a, .pagination-sm > li > span {
font-size: 12px;
line-height: 1.5;
padding: 5px 10px;
}
.pagination-sm > li:first-child > a, .pagination-sm > li:first-child > span {
border-bottom-left-radius: 3px;
border-top-left-radius: 3px;
}
.pagination-sm > li:last-child > a, .pagination-sm > li:last-child > span {
border-bottom-right-radius: 3px;
border-top-right-radius: 3px;
}*/
.pager {
list-style: outside none none;
margin: 20px 0;
padding-left:;
text-align: center;
}
.pager li {
display: inline;
}
.pager li > a, .pager li > span {
background-color: #fff;
border: 1px solid #ddd;
border-radius: 15px;
display: inline-block;
padding: 5px 14px;
text-decoration: none;
}
.pager li > a:hover, .pager li > a:focus {
background-color: #eee;
text-decoration: none;
}
.pager .next > a, .pager .next > span {
float: right;
}
.pager .previous > a, .pager .previous > span {
float: left;
}
.pager .disabled > a, .pager .disabled > a:hover, .pager .disabled > a:focus, .pager .disabled > span {
background-color: #fff;
color: #777;
cursor: not-allowed;
}
.pager > .active > a, .pager > .active > span, .pager > .active > a:hover, .pager > .active > span:hover, .pager > .active > a:focus, .pager > .active > span:focus {
background-color: #eee;
cursor: default;
z-index:;
}

基于mvcpager的分页(get请求,刷新页面),提供两种样式(来自bootstrap的样式)的更多相关文章

  1. Javascript刷新页面的几种方法

    Javascript刷新页面的几种方法: window.navigate(location)location.reload()location=locationlocation.assign(loca ...

  2. Javascript刷新页面的八种方法

    /** * Javascript刷新页面的八种方法 * 说明一下,jQuery没有发现刷新页面的方法. */ 1 history.go(0) 2 location.reload() 3 locatio ...

  3. JS刷新页面的几种方法(转)

    Javascript刷新页面的几种方法: 1 history.go(0) 2 location.reload() 3 location=location 4 location.assign(locat ...

  4. Javascript刷新页面的几种方法:

    Javascript刷新页面的几种方法: 1    history.go(0) 2    window.location.reload() window.location.reload(true)  ...

  5. js刷新页面的几种方式与区别

    Javascript刷新页面的几种方法:1 history.go(0) 2 location.reload() 3 location=location 4 location.assign(locati ...

  6. 网络笔记01-3 socket 实现百度页面的两种方式

    scoket 实现百度页面的两种方式: 1.利用系统自带    //1.创建URL NSURL *url=[NSURL URLWithString:@"http://m.baidu.com& ...

  7. WebView加载页面的两种方式——网络页面和本地页面

    WebView加载页面的两种方式 一.加载网络页面 加载网络页面,是最简单的一种方式,只需要传入http的URL就可以,实现WebView加载网络页面 代码如下图: 二.加载本地页面 1.加载asse ...

  8. Apacheserver自己定义404页面的两种方法以及.htaccess的重要命令总结

    Apacheserver自己定义404错误页面有两种方法: 第一种方法最简单,直接在Apache的httpd.conf下进行配置改动命令,改动的内容请參看.htaccess命令写法中的自己定义错误页面 ...

  9. 用easyui从servlet传递json数据到前端页面的两种方法

    用easyui从servlet传递json数据到前端页面的两种方法 两种方法获取的数据在servlet层传递的方法相同,下面为Servlet中代码,以查询表中所有信息为例. //重写doGet方法 p ...

随机推荐

  1. dia无法输入中文?

    解决方法: 以管理员权限打开/usr/bin/dia ,做如下修改 #dia-gnome --integrated "$@" dia-gnome "$@"

  2. Hadoop自学笔记(五)配置分布式Hadoop环境

    上一课讲了怎样在一台机器上建立Hadoop环境.我们仅仅配置了一个NHName Node, 这个Name Node里面包括了我们全部Hadoop的东西.包括Name Node, Secondary N ...

  3. 【Android】3.10 热力图功能

    分类:C#.Android.VS2015.百度地图应用: 创建日期:2016-02-04 一.简介 热力图是用不同颜色的区块叠加在地图上描述人群分布.密度和变化趋势的一个产品,可利用自有数据,构建属于 ...

  4. Spark参数配置

    转自:http://hadoop1989.com/2015/10/08/Spark-Configuration/ 一.Spark参数设置 二.查看Spark参数设置 三.Spark参数分类 四.Spa ...

  5. Qt入门-layout布局

    开发一个图形界面应用程序,界面的布局影响到界面的美观.在设计一个界面之前,应该考虑到开发的界面可能给不用的用户使用,而用户的屏幕大小.纵横比例.分辨率可能不同,界面还可能是可缩放的,程序应该可以适应这 ...

  6. 字符设备驱动笔记——中断方式按键驱动之linux中断处理结构(五)

    一.单片机下的中断处理 )分辨是哪一个中断 )调用处理函数 )清中断 二.linux下的中断处理 1)/arch/arm/kernel/irq.c asmlinkage void __exceptio ...

  7. 解析html文档的java库及范例

    用这个工具jsoup <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <v ...

  8. Hibernate中HQLwhere用法和单独取出几列数据的读取方法

    String hql = "select thedate,thehour,node,query_num from Cdns cdns where thehour = " +&quo ...

  9. LeetCode: Longest Consecutive Sequence 解题报告

    Longest Consecutive Sequence Given an unsorted array of integers, find the length of the longest con ...

  10. 【GitHub】 README.ME 格式

      README =========================== 该文件用来测试和展示书写README的各种markdown语法.GitHub的markdown语法在标准的markdown语法 ...