首先设置GridView的 AllowPaging="true" PageSize="5"
再在GridView的事件列表中选择PageIndexChanging事件双击
再在后台代码中写如下代码:
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
Bind();
2022-02-14 01:56:56
首先设置GridView的 AllowPaging="true" PageSize="5"
再在GridView的事件列表中选择PageIndexChanging事件双击
再在后台代码中写如下代码:
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
Bind();