<tr class="tr1">
                <td>
                    共<asp:Literal runat="server" ID="litNum"></asp:Literal>条内容
                </td>
                <td colspan="4">
                    <div style="font-size: 12px; line-height: 22px; font-family: Arial; position: relative;
                        height: 22px">
                        <zzz:AspNetPager ID="Pager1" runat="server" PageSize="20" ShowInputBox="Always" UrlPaging="true"
                            AlwaysShow="true" LastPageText="末页" NextPageText="下一页" FirstPageText="首页" PrevPageText="上一页">
                        </zzz:AspNetPager>
                    </div>
                </td>
                <td align="middle">
                </td>
            </tr>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using NHibernate;
using NHibernate.Expression;
using System.Data;
using Webdiyer.WebControls.Mvc;
  int recordcount = 0;
        int page = 1;
        page = (string.IsNullOrEmpty(Request.QueryString["page"])) ? 1 : int.Parse(Request.QueryString["page"]);
        //int firstnum = (page == 1) ? 0 : ((page - 1) * Pager1.PageSize);
        string sqlstr = string.Format("SELECT * FROM Vouchers order by Status desc limit {0} offset {0}*{1}", Pager1.PageSize, page - 1);
        DataSet ds = SQLiteHelper.ExecuteQuery(sqlstr);
        DataTable dt = ds.Tables[0];
        recordcount = int.Parse(dt.Rows[0][0].ToString());
        rptPage.DataSource = dt;
       rptPage.DataBind();
       litNum.Text = recordcount.ToString();
       Pager1.RecordCount = recordcount/10;
       Pager1.CurrentPageIndex = page; web.congif
<system.web>
    <compilation debug="true" targetFramework="4.0"/>
       <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" validateRequest="false">
      <controls>
        <add namespace="Wuqi.Webdiyer" assembly="AspNetPager" tagPrefix="zzz"/>
        <add namespace="Business.Project.Website" assembly="TyTextBox" tagPrefix="dry"/>
        <add namespace="PageCtrl" assembly="PageCtrl" tagPrefix="cc1"/>
      </controls>
    </pages>
  </system.web>

sqlite mvc分页的更多相关文章

  1. MVC分页

    http://www.cnblogs.com/iamlilinfeng/p/4075292.html 目录 一.Contrl与View数据传递(多表数据) 二.分页控件介绍 三.MVC源码说明 四.源 ...

  2. ASP.NET MVC分页组件MvcPager 2.0版发布暨网站全新改版

    MvcPager分页控件是在ASP.NET MVC Web应用程序中实现分页功能的一系列扩展方法,该分页控件的最初的实现方法借鉴了网上流行的部分源代码, 尤其是ScottGu的PagedList< ...

  3. ASP.NET MVC 4使用PagedList.Mvc分页

    ASP.NET MVC中进行分页的方式有多种,在NuGet上有提供使用PagedList.PagedList.Mvc进行分页. 1. 通过NuGet引用PagedList.Mvc 在安装引用Paged ...

  4. ASP.NET MVC分页实现之改进版-增加同一个视图可设置多个分页

    我之前就已经实现了ASP.NET MVC分页(查看该博文),但它有局限性,必须确保在同一个视图中只能有一处分页,若需要在同一个视图中设置多个分页,却无能为力,为此,我重新对原先的代码进行了优化,增加了 ...

  5. Mvc 分页栏扩展方法

    using System; using System.Collections.Generic; using System.Reflection; using System.Text; using Sy ...

  6. 转:MVC分页

    原文地址:http://www.cnblogs.com/iamlilinfeng/p/4075292.html 分页总是搞得我很烦,也是因为刚接触,貌似有好多插件,之前在用一个,可是后来发现一翻页原来 ...

  7. spring mvc 分页

    spring mvc 分页

  8. 基于Bootstrap的Asp.net Mvc 分页

    基于Bootstrap的Asp.net Mvc 分页的实现 最近写了一个mvc 的 分页,样式是基于 bootstrap 的 ,提供查询条件,不过可以自己写样式根据个人的喜好,以此分享一下.首先新建一 ...

  9. Mvc分页组件MvcSimplePager代码重构

    1 Mvc分页组件MvcSimplePager代码重构 1.1 Intro 1.2 MvcSimplePager 代码优化 1.3 MvcSimplePager 使用 1.4 End Mvc分页组件M ...

随机推荐

  1. jsp页面编译成Servlet类文件

    package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.js ...

  2. APPDelegate----launchOptions启动类型

    IOS 中的 AppDelegate.m/h 文件是很重要的呢,因为它是对 Application 的整个生命周期进行管理的. 先明白,每个iPhone应用程序都有一个UIApplication,UI ...

  3. 在Virtual Box虚拟机中安装MS DOS!

    原文地址:https://mylinuxramblings.wordpress.com/2010/12/05/linux-mint-debian-edition-lmde-first-impressi ...

  4. shell 外部传入jmeter脚本线程数,rampUp时间,持续运行时间

    jmeter参数化部分参考上一篇 shell参数说明:$1线程数,$2:全部并发数rampup时间,$3:脚本持续运行时间,$4:每次脚本循环持续时间 $5:所以循环持续时间 #!/bin/bash ...

  5. .Net中Math.Round与四舍五入

    有不少人误将Math.Round函数当作四舍五入函数在处理, 结果往往不正确, 实际上Math.Round采用的是国际通行的是 Banker 舍入法. Banker's rounding(银行家舍入) ...

  6. [转]dispatcher、redirect和chain三种result type的使用区别

    http://blog.163.com/zhangfei_jiayou/blog/static/562441782009826045248/ dispatcher:用于页面转发,页面跳转过程一直是同一 ...

  7. 01-Quartz2D介绍

    01-PPT介绍 *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !impo ...

  8. NEERC 2013, Eastern subregional contest

    I. The old Padawan Time limit: 0.5 secondMemory limit: 64 MB Yoda: Use the Force. Yes. Now, the ston ...

  9. (Loadrunner)Abnormal termination, caused by mdrv process termination.(转)

    Load generator跑了太多用户导致CPU和内存爆满,进程无法处理请求 确认自定义的代码是否释放内存 合理调整或增加思考时间 关闭extended log 尽量避免使用Load generat ...

  10. sublimeText3-EOFError: EOF when reading a line

    最近在自学python,练习网上教程代码的时候遇到: EOFError: EOF when reading a line 发现原因是sublime的console不支持输入,安装SublimeREPL ...