<PagerSettings FirstPageText="首页" LastPageText="末页" Mode="NextPreviousFirstLast" NextPageText="下一页" PreviousPageText="上一页" /> protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e) { //....... //重新加载数据的代码 this.GridView1.DataSource = ds.Tables[0]; GridView1.PageIndex = e.NewPageIndex |
<asp:GridView ID="myGridView" DataSourceID="mySql" AutoGenerateColumns="True" runat="server" AllowPaging="True" PageSize="3">
<PagerSettings
Mode = "NextPreviousFirstLast"
FirstPageText = "第一页"
PreviousPageImageUrl="images/pageUp.gif"
NextPageImageUrl="images/pageDown.gif"
LastPageText = "末页">
</PagerSettings>
</asp:GridView>