ASP.NET GridView Paging + PageIndexChanging
default.aspx (Paging 必要部分) |
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" PageIndex="0" PageSize="30" PagerSettings-PageButtonCount="15"> <PagerSettings PageButtonCount="15" Position="Bottom" /> </asp:GridView> |
default.aspx (PageIndexChanging 必要部分) |
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As GridViewPageEventArgs) _ Handles GridView1.PageIndexChanging GridView1.PageIndex = e.NewPageIndex GridView1.DataSource = dt GridView1.DataBind() End Sub |