[转帖]DataGrid的自定义分页UserControl(15) currentpage = 0; ViewState["currentpage"] = currentpage; FillGrid(proc,currentpage,pagesize,datagrid); //如果不止一页 if((int)ViewState["rowscount"]>((int)ViewState["currentpage"]+1)*pagesize) { NextPage.Enabled = true; } if((int)ViewState["rowscount"]>((int)ViewState["currentpage"]+1)*pagesize) {