ASP's inexplicable error

Source: Internet
Author: User
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
%>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.