Prepare resources:
Aspnetpager Download URL: http://www.webdiyer.com/download/default.aspx
ASP. NET AJAX Download URL: http://www.asp.net/downloads/
First of all, we should first understand aspnetpager this paging tool work, or there are several paging methods, Aspnetpager officially said: Support through the URL paging, support postback paging, the difference between:/HTTP Detailed instructions are available on the www.webdiyer.com/AspNetPager/WhyUrlPaging.aspx. In fact, url paging is a full address followed by a number of pages to jump, such as http://www. xxx.com/xxx/xxx.aspx?page=2, while postback paging is displayed in the browser status bar such as Javascript:__dopostback (' xxx$xxx$xxx ', ' 2 '), is clearly the way of background calls.
Knowing the paging mechanism, we know that we should choose the kind of facet mechanism to compare with ASP. NET AJAX is simpler, is postback.
Postback way:
<webdiyer:aspnetpager id= "AspNetPager1" runat= "Server" pagesize= "numericbuttoncount=" 10 "
Showcustominfosection= "left" pagingbuttonspacing= "0" alwaysshow= "true" showdisabledbuttons= "false"
cssclass= "Pager_css" horizontalalign= "right" submitbuttontext= "Go" showmorebuttons= "true"
numericbuttontextformatstring= "[{0}]" onpagechanged= "aspnetpager1_pagechanged" currentpagebuttonposition= " Beginning "
firstpagetext= "Home" lastpagetext= "last" nextpagetext= "Next" prevpagetext= "previous"
Showpageindexbox= "Always" textafterpageindexbox= "page" textbeforepageindexbox= "Go" >
</webdiyer:AspNetPager>
Url Rewrite method:
<webdiyer:aspnetpager id= "AspNetPager1" runat= "Server" pagesize= "numericbuttoncount=" 10 "
Showcustominfosection= "left" pagingbuttonspacing= "0" alwaysshow= "true" showdisabledbuttons= "false"
cssclass= "Pager_css" horizontalalign= "right" submitbuttontext= "Go" showmorebuttons= "true"
numericbuttontextformatstring= "[{0}]" onpagechanged= "aspnetpager1_pagechanged" currentpagebuttonposition= " Beginning "
Pagingbuttonlayouttype= "Span" showpageindexbox= "Always" textafterpageindexbox= "page" textbeforepageindexbox= "Go" urlpaging= "True" >
</webdiyer:AspNetPager>
Note An important difference between the two:urlpaging= "True"
The rest is needless to say, such as importing ASP. NET AJAX references, but it is important to note when configuring the Web. config file, especially in projects that have already been built. The best thing to do is to build an ASP. NET AJAX project, and then copy the contents of its web. config into your project configuration file, test your eyesight and endurance, hehe. On the page is to put the GridView and Aspnetpager in the Asp:updatepanel.
These are just the tip of the iceberg of the ASP. NET AJAX feature, which does not provide a way to use, research and use of ASP. NET AJAX will certainly make your Web project more plump.
Aspnetpager + GridView + ASP. AJAX Page No Refresh implementation