最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net PagedDataSource分页实现代码
时间:2022-06-25 05:02:47 编辑:袖梨 来源:一聚教程网
private void databind(ilist
datasource,int count)
{
pageddatasource pds = new pageddatasource();
pds.datasource = datasource;
pds.allowpaging = true;
pds.pagesize = 10;
pds.currentpageindex = index;
viewstate["allpage"] = pds.pagecount;
if (index == 0)
{
this.imgpre.visible = false;
this.imgfrist.visible = false;
}
else if (index == pds.pagecount - 1)
{
this.imgnext.visible = false;
this.imgend.visible = false;
}
if (count == 0)
{
this.lblcount.text = "对不起,没有您要查询的记录;";
this.imgpre.visible = false;
this.imgfrist.visible = false;
this.imgnext.visible = false;
this.imgend.visible = false;
}
else if (count<=10)
{
this.lblcount.text = "共 " + count + " 条数据 当前 " + (pds.currentpageindex + 1) + "/" + pds.pagecount + " 页";
this.imgpre.visible = false;
this.imgfrist.visible = false;
this.imgnext.visible = false;
this.imgend.visible = false;
}
else
{
this.lblcount.text = "共 " + count + " 条数据 当前 " + (pds.currentpageindex + 1) + "/" + pds.pagecount + " 页";
}
this.gridview1.datasource = pds;
this.gridview1.databind();
}
相关文章
- 巅峰极速日服纯净官网入口-极速日服官方正版入口 12-14
- 四六级考试官网登录通道-全国大学英语四六级报名系统 12-14
- 1元10抖币极速充值官网入口-抖币充值iOS用户独享通道 12-14
- 学习通网页版登录入口 官方免费在线使用学校通 12-14
- 126免费邮箱官网密码找回通道-126免费邮箱官网双重验证入口 12-14
- qq查价免费入口一键速达-qq价格评估查询方法 12-14