1.引入ScriptManager
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
2.相应代码
<asp:UpdatePanel ID="UpdatePanel1" runat="server"><ContentTemplate>
<asp:GridView ID="GridView1" runat="server"></asp:GridView>
<webdiyer:aspnetpager ID="AspNetPager1" runat="server" AlwaysShow="True" FirstPageText="首页" LastPageText="末页" NextPageText="下一页"
PrevPageText="上一页" onpagechanged="AspNetPager1_PageChanged" NumericButtonCount="6" PageSize="5"></webdiyer:aspnetpager>
</ContentTemplate></asp:UpdatePanel>
3.代码中绑定数据