GridView的分页问题(谢谢!)
this.Button1.Enabled = true;if (this.GridView1.PageIndex == 0)
{
this.Button1.Enabled = false;
}
protected void Button1_Click(object sender, EventArgs e)//上一页
{
this.GridView1.PageIndex = this.GridView1.PageIndex - 1;
this.binding();
}
protected void Button2_Click(object sender, EventArgs e)下一页
{
if (this.GridView1.PageCount > this.GridView1.PageIndex)
{
this.GridView1.PageIndex = this.GridView1.PageIndex+ 1;
this.binding();//绑定
}
if (this.GridView1.PageCount == this.GridView1.PageIndex + 1)
{
this.Button2.Enabled = false;
}
}
为什么Button2的对着,点击Button1的时候不起作用??