See this article on the InternetArticleAspnetpager + gridview + ASP. Net Ajax page refreshing implementation feel a lot of GAINS. We recommend it to you here,
Public partial class hyzxlist: system. Web. UI. Page {protected void page_load (Object sender, eventargs e) {If (! Ispostback) {getdata () ;}} private void getdata () {info I = new info (); int classid = 1; if (! String. isnullorempty (request. querystring ["classid"]) {classid = int. parse (request. querystring ["classid"]. tostring ();} int pageindex = 1; // If (request ["page"]! = NULL) // {// pageindex = convert. toint32 (request ["page"]); //} If (Response <1) {pageindex = 1;} else {pageindex = aspnetpager1.currentpageindex;} int pagenum = aspnetpager1.pagesize; int recordcount; string classname; listview1.datasource = I. getinfobyclassid (pageindex, pagenum, out recordcount, classid, out classname); listview1.databind (); titleleft. innertext = classname; titleright. innerhtml = "your current location>" + classname; aspnetpager1.recordcount = recordcount;} protected void aspnetpager1_pagechanging (Object SRC, Wuqi. webdiyer. pagechangingeventargs e) {aspnetpager1.currentpageindex = E. newpageindex; getdata ();} protected void aspnetpager?pagechanged (Object sender, eventargs e ){}}
The page_changing event is used here;
The pagechanged events that were used at the beginning always prompt strange errors, or simply fail to flip pages;