惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
Recorded Future
Recorded Future
博客园 - 司徒正美
V
Vulnerabilities – Threatpost
月光博客
月光博客
C
CXSECURITY Database RSS Feed - CXSecurity.com
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
W
WeLiveSecurity
Jina AI
Jina AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Hacker News: Ask HN
Hacker News: Ask HN
S
Security Affairs
V
Visual Studio Blog
Schneier on Security
Schneier on Security
T
Tailwind CSS Blog
Martin Fowler
Martin Fowler
V2EX - 技术
V2EX - 技术
博客园 - Franky
S
Secure Thoughts
Blog — PlanetScale
Blog — PlanetScale
G
GRAHAM CLULEY
D
DataBreaches.Net
O
OpenAI News
Forbes - Security
Forbes - Security
云风的 BLOG
云风的 BLOG
Google Online Security Blog
Google Online Security Blog
博客园 - 三生石上(FineUI控件)
T
Tor Project blog
T
Tenable Blog
Latest news
Latest news
N
News and Events Feed by Topic
博客园_首页
Simon Willison's Weblog
Simon Willison's Weblog
C
Cybersecurity and Infrastructure Security Agency CISA
美团技术团队
T
The Exploit Database - CXSecurity.com
K
Kaspersky official blog
B
Blog
阮一峰的网络日志
阮一峰的网络日志
T
Threat Research - Cisco Blogs
SecWiki News
SecWiki News
PCI Perspectives
PCI Perspectives
GbyAI
GbyAI

博客园 - BlackPhoenix

SQL Server将数据导出SQL脚本的方法 国内Asp.net博客系统收集和简单介绍 1999-2006中国统计年鉴 CodeSmith.Pro.4.1.2破解和注册 office2007的电脑上,右键菜单新建“office2003”文档的办法! 农行动态口令卡问题解决方案(Key:Vista,IE7,证书已锁定,438对象不支持此属性或方法) VS2005Team版如何进行单元测试 解决vista系统部分CHM打不开,“无法正常显示”的问题 序列化- 使用BinaryFormatter进行序列化 C#开源资源大汇总 Windows Vista中微软拼音输入法2007默认是英文标点问题解决 string.format()字符传格式化时特殊字符要进行转义 C#:String.Format数字格式化输出 [coll]ASP.NET刷新页面的六种方法 [转]DataFormatString的使用 [转]中国大学金融专业排名 SQL SERVER的字段类型说明及简单比较 两个月没编程了,现在开工! 结合委托与AJAX,实现无刷新确认对话框的开源用户控件
ASP.NET-GridView的分页功能
BlackPhoenix · 2008-08-02 · via 博客园 - BlackPhoenix

ASP.NET-GridView的分页功能

2007-12-05 19:54

要实现GrdView分页的功能。
操作如下:
1、更改GrdView控件的AllowPaging属性为true。
2、更改GrdView控件的PageSize属性为 任意数值(默认为10)
3、更改GrdView控件的PageSetting->Mode为Numeric等(默认为Numeric)该属性为分页样式。
GridView属性设置好了,从页面上也能看到分页样式。

现在开始实现分页的功能:
1、在<<asp:GridView ID=......>后添加,OnPageIndexChanging="GridView1_PageIndexChanging"
2、在对应的aspx.cs中添加:
    protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {
        GridView1.PageIndex = e.NewPageIndex;
        InitPage(); //重新绑定GridView数据的函数
    }
3、
GridView1.PageIndex = e.NewPageIndex;
完了之后再

重新绑定一下GridView。