asp分页错误 求助 ?
<%page = cint(request("page"))
if page= "" then
page = 1
end if
response.Write(page)
mypagesize =8
Set rs =Server.CreateObject("Adodb.RecordSet") ''定义查询指针
sql = "select * from news where categoryid = " & id & " order by id desc "
rs.open sql,conn,1,1
rs.pagesize = mypagesize
pages=cint(rs.pagecount)
if page<1 or page > pages then
page = 1
end if
<br>一共<%= pages %>页,每页<%= mypagesize %>条<%
if pages>1 and page>1 then
Response.Write("<a href=?page=1>第一页</a> ")
end if
if page>1 and pages>1 then
Response.Write("<a href=?page=" & page-1 & ">上一页</a> ")
end if
if page<pages and pages>1 then
Response.Write("<a href=?page=" & page+1 & ">下一页</a> ")
end if
if page<pages and pages>1 then
Response.Write("<a href=?page=" & pages & ">尾页</a> ")
end if %>
请问下 这个分页为什么一点第二页就出错额 页面运行是http://localhost/news/list.asp?id=1
点下一页后 变成
http://localhost/news/list.asp?page=2
然后就是显示错误
An error occurred on the server when processing the URL. Please contact the system administrator.
If you are the system administrator please click here to find out more about this error.