Error This is a simple test pagination program, the code is as follows:
<% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "HTTP://WWW.W3.ORG/TR/HTML4/LOOSE.DTD" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> Testing Paging </title>
<body>
<%
Dim all, CNT, page, dig
Dig = 10 ' Show entries per page
All = 100 ' Total Display entries
CNT = 1
page = request.querystring ("page")
Pagenum = All/dig
Response.Write ("Pagenum =" &pagenum& "<br>page =" &page& "<br>")
%>
<%
CNT = 1
Do Until CNT > all
If Cnt> (page-1) *dig and Cnt<=page*dig Then
Response.Write ("cnt =" &cnt & "<br>")
Response.Write ("")
End If
CNT = cnt + 1
Loop
' Process the next page
if (page-pagenum) =0 Then
' If Page=pagenum then this is not a drop, it's funny
NXT = "<td align=center> has reached the last page </td>"
Else
NXT = "<td><div align=center><a href=testpage2.asp?page=" & (page+1) & "> next page </a></ Div></td> "
End If
' Process previous page
If Page>1 Then
BCK = "<td><div align=center><a href=testpage2.asp?page=" & (page-1) & "> previous page </a></ Div></td> "
End If
%>