private void 获取数据123()
{
//xxx
}
protected void 你的GirdView名称_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
你的GirdView名称.PageIndex = e.NewPageIndex;
获取数据123();
}
当然还需要你的页面对GridView进行以下设置
AllowPaging="True" onpageindexchanging="你的GirdView名称_PageIndexChanging"
呵呵,说得很通俗,快把中文改成英文试试吧!
要添加GV的事件才行的.代码如下:
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
GridView1.DataBind();
}