We continue to pick up in the page by calling showpage () by calling showpage (), showpage can call any position after GETRS, or call multiple public subs showpage () DIM STR_TMP INT_TOTALRECORD = XD_RS.Recordcount if int_totalRecord <= 0 THEN str_error = str_error & "the total number of records is zero, the data enter" Call ShowError () End If If int_totalRecord = "" Then int_TotalPage = 1 Else If int_totalRecord mod PageSize = 0 Then int_TotalPage = CLng (int_TotalRecord / XD_PageSize * -1) * -1 else int_totalpage = clng (int_totalRecord / xd_pagesize * -1) * - 1 1 end if end if INT_CURPAGE> INT_TOTALPAGE INT_CURPAGE = INT_TOTALPAGE END IF '================ ======================================================================================================================================================== Position '================================================ ===== response.write "str_tmp = ShowFirstPrv 'show home page, previous page response.write str_tmp str_tmp = showNumBtn' digital navigation response.write str_tmp str_tmp = ShowNextLast 'next page, last page response.write str_tmp str_tmp = ShowPageInfo Response.write str_tmp response.write "" End Sub to this class "" In order to save the layout, I have no way to put it up, then there is all the full code) Write a simple page to test <% 'to pane Category contains coming in set conn = server.createObject ("adoDB .connection ") Conn.open" Driver = {Microsoft Access Driver (* .mdb)}; dbq = "& Server.mappath (" pages.mdb ") '
############# 类 样 图片 ########## Create object set mypage = new xdownpage 'Get database connection mypage.getconn = Conn 'sql statement mypage.getsql = "select * from [test] ORDER BY ID ASC" Sets the record strip data for each page to 5 mypage.pagesize = 5' Return Recordset Set RS = mypage.getrs () ' Page information, this method can be, after SET RS = mypage.getrs (), you can call multiple times.showpage () display data response.write ("" after SET RS = mypage.getrs ().
") for i = 1 to mypage.pageSize 'You can customize the display method for if not rs.eof the reboardse.write RS (0) &"