protected void gvValues_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
gvValues.PageIndex = e.NewPageIndex;
this.FillData();
}
分页工作正常,但是当我在上一个或第一个时,它会给我一个错误
Input string was not in a correct format.
答案 0 :(得分:0)
编写以下代码:
protected void gvValues_PageIndexChanging(object sender, GridViewPageEventArgs e){
GridView1.PageIndex = e.NewPageIndex;
//rebind your gridview - GetSource(),Datasource of your GirdView
GridView1.DataSource = GetSource();
GridView1.DataBind();
}