有个是否分页的属性,设置成True
用DropDownlist做,启用它的自动回发
protected void DropDownList1_SelectedIndexChanged1(object sender, EventArgs e)
{
lbCurrent.Text = (DropDownList1.SelectedIndex + 1).ToString();
pds.CurrentPageIndex = DropDownList1.SelectedIndex;
Binding();
}
可以下载个ASpnetpager控件学学怎么用,非常好用,功能完善
Protected Sub gvRequests_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles gvRequests.PageIndexChanging Me.gvRequests.PageIndex = e.NewPageIndex
BindGrid()
End Sub
You need to handle that event and rebind your grid.