<!-#Include file = "conn.asp "->
<%
"The following part is to verify whether the Page submitted is a legal parameter
"This part is best to determine whether the submitted parameter is a value character
DIM PAGE
Page = Trim (Request ("Page")
If page = "" then
page = 1
Elseif cint (page) <= 0 then
page = 1
else
Page = CINT (PAGE)
End if
"Inquiry, take out the record you want to display
DIM RS, SQL, STR
Set rs = server.createObject ("Adodb.oldSet")
SQL = "Select * from A1"
RS.Oopen SQL, CONN, 1,3
if not rs.eof then
str = RS ("A1")
End if
RS.Close
Set rs = Nothing
"Put the recorded records in the array
dim strtmp
strtmp = Split ((Str), "<br>"))
"Remove the record to be displayed, and get the number of pages at the same time
Dim n, tmp, i, j, tt
n = 500
i = 0
j = 0
Do while I <= uborder (strtmp)
TMP = strtmp (i)
TT = TRUE
Do while tt
If i> = ubound (strtmp) then
TT = FALSE
j = j 1
Elseif Len (TMP)> = N The
TT = FALSE
j = j 1
Elseif Len (TMP) Len (StrTMP (I 1))> = N THEN
TT = FALSE
j = j 1
Else
TMP = TMP "<br>" StrTMP (I 1)
i = i 1
End if
Loop
if page = j then str = tmp "<br>"
i = i 1
Loop
"Determine whether the parameters of the transmission are crossing the border, if you cross the border, you will get the content of the last page
if page> j then
str = TMP
end if
"Show the paging content
"Pay attention to the parameters of the passing, only Page is passed here. If there are other parameters to be passed together, otherwise it will not be displayed after the paging.
response.write "paging->" "" "
For n = 1 to j
if n = page then
response.write "& nbsp;" & n & "& nbsp;"
else
response.write "[<a href = index.asp? Page =" & n & ">" & n & "</a>]
end if
Next
response.write "<br> <br>" "
"Show this part of this part of the content to be displayed
response.write Str
%>