PageTest.asp performance page <%
strsql = "SELECT * from authors"
SET RS = Server.createObject ("AdoDb.Recordset")
RS.Open Strsql, CONN, 1, 1
Set PageBase
Page.pageSize = 3
IF not isnumeric (Request ("page") ")") = 1) Then page.currentpage = 10 else page.currentpage = Request ("Page") End iFend IF
Page.LinkURL = "PageTest.asp"
Page.show (RS)
Page.fenye (RS)%>
Object.asp page object <%
'********************************** The *' * Nide's * '* mainly: Page classes. . . . . '*' * Coolwind qq: 1294420 '*' ******************************************
Class PageBasedim Pagesize 'Documentary DIM CURRENTPAGE' Each page DIM CURRENTPAGE 'Of course, DIM LINKURL' Dynamic URL
Sub show (ORS)
'Sub-programs displaying the page symbol ----------------------------------------------------------------------------------------------------------------- -------------------- i = 0 rs. & "
" i = i 1 Ors.movenext Loopend Sub "Show subroutines for paged symbols ------------------------- ------------------------------------
Sub Fenye (ORS)
Totalput = ips.recordcount pagesum = Totalput / Pagesize
'If it is the first page response.write "" & currentpage & "page / total" & pagesum & "page"
maxpage = 0 minpage = 0 if then minpage = currentpage-5 if (currentpage 4)> pagesum then maxpage = pagesum else maxpage = currentpage 4 end if else minpage = 1 if pagesum ((currentpage-5)> 1)> 10 Then maxpage = 10 else maxpage = Pagesum End (CINT (CURRENTPAGE-1)> 0) THEN IF (CINT (CURRENTPAGE-1)> CINT (PAGRENTPAGE-1)> CINT (PAGESUM)) THEN RESE.WRITE " << Previous a> "else response.write" << Previous a> "end if End if for i = minpage to maxpage if (cint (i) = cint (currentpage)) "[" & I & "]" else response.write "[ "& I &" ] "Endness"> 0) Then Response.write "
"The following is another paging display interface if currentpage = 1 Then Response.write" [Page] "Response.write" [Previous] "Else Response .Write "[ "[ Previous ] "endiff
'If it is the last page
IF CINT (CURRENTPAGE)