public void BindData()
{
int count = this.GridView1.PageCount;//h获取总页数在调试的时候
//count=1而this.GridView1.PageCount=4这是为什么呢
int current = this.GridView1.PageIndex;
if (current ==0)
{
this.LbFirst.Enabled = false;
this.LbLast.Enabled = false;
}
else
{
this.LbFirst.Enabled = true;
this.LbLast.Enabled = true;
}
if (current == (count - 1))
{
this.LbNext.Enabled = false;
this.LbEnd.Enabled = false;
}
else
{
this.LbNext.Enabled = true;
this.LbEnd.Enabled = true;
}
{
int count = this.GridView1.PageCount;//h获取总页数在调试的时候
//count=1而this.GridView1.PageCount=4这是为什么呢
int current = this.GridView1.PageIndex;
if (current ==0)
{
this.LbFirst.Enabled = false;
this.LbLast.Enabled = false;
}
else
{
this.LbFirst.Enabled = true;
this.LbLast.Enabled = true;
}
if (current == (count - 1))
{
this.LbNext.Enabled = false;
this.LbEnd.Enabled = false;
}
else
{
this.LbNext.Enabled = true;
this.LbEnd.Enabled = true;
}
解决方案 »
- 【高分求教】判断图片的真实格式
- 这样的网站!
- 这个div如何设计啊
- 如何将“yyyy-MM-dd”转换成“yyyyMMdd”?时间类型为Varchar
- 问个问题,希望能给点提示~~
- !!!!!!!!!!!!!!!!!!!!!!!!跪求,网络视频会议源码!!!!!!!!!!!!!!解决后立刻结贴
- asp.net2005打包必须把代码都搞进去吗?
- 自己做的網站﹐上傳excel后﹐當下載的時候出現這個錯誤.如果您是使用[檔案]功能表最下方的最近使用檔案清單來開啟檔案 ,解決1000分相送,
- 在线急等:一个正则表达式的问题
- ASP.net如何实现单击按钮后进入到下一个页面?
- vs2005+sql2005开发的东西,现在服务器那边是sql2000 怎么办啊???
- 怎么才能做到Web优化???
{
Response.write("begin:"+this.GridView1.PageCount);
int count = this.GridView1.PageCount;//h获取总页数在调试的时候
Response.write("count:"+count);
//count=1而this.GridView1.PageCount=4这是为什么呢
int current = this.GridView1.PageIndex;
if (current ==0)
{
this.LbFirst.Enabled = false;
this.LbLast.Enabled = false;
}
else
{
this.LbFirst.Enabled = true;
this.LbLast.Enabled = true;
}
if (current == (count - 1))
{
this.LbNext.Enabled = false;
this.LbEnd.Enabled = false;
}
else
{
this.LbNext.Enabled = true;
this.LbEnd.Enabled = true;
}