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

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - maoyu417

Size Classes with Xcode 6 Android viewPage notifyDataSetChanged无刷新 android、apple PUSH 异同比较 同一位置(同一个ImageView)显示不同的图片--level-list (转) (Android实战)界面设计注意事项 LinearLayout android:layout_weight的理解 给C盘减减肥,让你电脑飞一般速度! - maoyu417 用SQL查看字符串ASCII码 解决union不能order by问题 利用sender的Parent获取GridView中的当前行(转载) - maoyu417 gridview固定表头 - maoyu417 - 博客园 将某网站设为主页方法 - maoyu417 - 博客园 SQL区分大小写——转载 字符串间空格在网页上自动合并 Windows Mobil中解决日期显示不正常的方法 VS升级序列号及升级方法 a标签变灰且不可用 ASP.NET读取XML文件4种方法 超时时间已到。在操作完成之前超时时间已过或服务器未响应。
DataList分页方法一 - maoyu417 - 博客园
maoyu417 · 2008-02-19 · via 博客园 - maoyu417

SqlConnection conn = new SqlConnection();
            conn.Open();
            SqlDataAdapter da = new SqlDataAdapter(sql, conn);
            DataSet ds = new DataSet();
            da.Fill(ds, "Product_gongqiu");

            PagedDataSource pds = new PagedDataSource();
            pds.DataSource = ds.Tables["Product_gongqiu"].DefaultView;
            //开启分页
            pds.AllowPaging = true;
            //显示显示的行数
            pds.PageSize = 8;
            //定义变量保存当前页索引
            int curPage;

            //判断当前页是否有跳转请求
            if (Request.QueryString["page"] != null)
                curPage = Convert.ToInt32(Request.QueryString["page"]);
            else
                curPage = 1;
            pds.CurrentPageIndex = curPage - 1;

            Label1.Text = "当前第" + curPage.ToString() + "页";
            Label2.Text = "共" + pds.PageCount.ToString() + "页";


            if (!pds.IsFirstPage)
            { //定义"上一页"超级连接的URL为:当前执行页面的虚拟路径,并传递下一页面的索引植
                prev.NavigateUrl = "@@@.aspx?page=" + (curPage - 1) + "&sqltext=" + sql + "&tiaojiantext=" + tiaojian;
            }
            if (!pds.IsLastPage)
            { //下一页
                next.NavigateUrl = "@@@.aspx?page=" + (curPage + 1) + "&sqltext=" + sql + "&tiaojiantext=" + tiaojian;
            }

            DataList1.DataSource = pds;
            DataList1.DataBind();