protected void lnkbtnFrist_Click(object sender, EventArgs e)
{
//首页
this.GridView_username.PageIndex = ;
this.ReadData();
}
protected void lnkbtnPre_Click(object sender, EventArgs e)
{
//上一页
if (this.GridView_username.PageIndex > )
{
this.GridView_username.PageIndex = this.GridView_username.PageIndex - ;
this.ReadData();
}
}
protected void lnkbtnNext_Click(object sender, EventArgs e)
{
//下一页
if (this.GridView_username.PageIndex < this.GridView_username.PageCount)
{
this.GridView_username.PageIndex = this.GridView_username.PageIndex + ;
this.ReadData();
}
}
protected void lnkbtnLast_Click(object sender, EventArgs e)
{
//最后一页
this.GridView_username.PageIndex = this.GridView_username.PageCount;
this.ReadData();
}
//选择所需要的页数
protected void ddlCurrentPage_SelectedIndexChanged(object sender, EventArgs e)
{
this.GridView_username.PageIndex = this.ddlCurrentPage.SelectedIndex;
this.ReadData();
}

gridview分页的更多相关文章

  1. asp.net gridview 分页显示不出来的问题

    使用gridview分页显示,在点击第二页的时候显示空白,无数据. 原因是页面刷新,绑定datatable未执行 解决方法: 1.将datatable设置为静态 2.在OnPageIndexChang ...

  2. Android GridView 分页加载数据

    android UI 往右滑动,滑动到最后一页就自动加载数据并显示 如图: package cn.anycall.ju; import java.util.ArrayList; import java ...

  3. GridView 分页方法

    要实现GrdView分页的功能. 操作如下: 1.更改GrdView控件的AllowPaging属性为true. 2.更改GrdView控件的PageSize属性为 任意数值(默认为10) 3.更改G ...

  4. GridView分页排序

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="GridviewPage.asp ...

  5. GridView分页的实现

    要在GridView中加入 //实现分页 AllowPaging="true" //一页数据10行 PageSize="10" // 分页时触发的事件 OnPa ...

  6. GridView分页功能的实现

    当GridView中显示的记录很多的时候,可以通过GridView的分页功能来分页显示这些记录.如果GridView是直接绑定数据库,则很简单:将"启动分页"打勾即可. 如果是用代 ...

  7. GridView分页的实现 ASP.NET c#(转)特好用

    要在GridView中加入 //实现分页 AllowPaging="true" //一页数据10行 PageSize="10" // 分页时触发的事件OnPag ...

  8. 自己写的一个ASP.NET服务器控件Repeater和GridView分页类

    不墨迹,直接上代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; usin ...

  9. GridView分页操作

    1.html <PagerStyle HorizontalAlign="Center" /> <PagerTemplate> 第: <asp:Labe ...

随机推荐

  1. jQuery笔记---选择器(三)

    1.1查找隐藏的tr元素的个数 $(“table tr:hidden”).size() 查找所有可见的tr元素的个数 $(“table tr:not(:hidden)”).size()   一般是不使 ...

  2. UI 06 ScrollView 的手动循环播放 与 自己主动循环播放

    假设想要循环播放的话, scrollView的照片前要加上最后一张图片, 最后要加上第一张图片. - (void)viewDidLoad { [super viewDidLoad]; // Do an ...

  3. [Node.js] Testing ES6 Promises in Node.js using Mocha and Chai

    Writing great ES6 style Promises for Node.js is only half the battle. Your great modules must includ ...

  4. 【27.85%】【codeforces 743D】Chloe and pleasant prizes

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  5. PatentTips - Highly-available OSPF routing protocol

    BACKGROUND OF THE INVENTION FIG. 1A is a simplified block diagram schematically representing a typic ...

  6. 终端复用工具tmux的使用

    tmux的作用在于终端复用. 1. 在server上启动一个bash.并在里面执行tmux 2. 通过ssh远程登录server,执行tmux attach,就会切换到server上的那个bash中, ...

  7. vs 外部依赖项、附加依赖项以及如何添加依赖项目

    我们在 VS 中创建 Win32 控制台应用程序,vs 会为解决方案创建默认地创建 4 个 filters(资源管理器中没有对应的目录和文件夹): 头文件:一般为 .h 文件 外部依赖项 源文件:一般 ...

  8. Linux基本命令(二)

    1. 输出重定向命令:> Linux允许将命令执行结果重定向到一个文件,本应显示在终端上的内容保存到指定文件中. 如:ls > test.txt ( test.txt 如果不存在,则创建, ...

  9. new File(String Path)加载资源问题

    2017-12-17   15:07:38  [原创-wx] 一.我们在用IO流加载资源的时候,创建文件资源 1 File file = New File("String Path" ...

  10. Go语言版黑白棋

    1.游戏说明 2.无边框窗口实现 3.背景图.最小化.关闭窗口 4.界面其它设计 5.黑白子提示闪烁效果 6.落子 7.初始化棋子.改变角色 8.倒计时 9.吃子 10.棋子个数统计.胜负判断 11. ...