关于asp中上下页的问题

来源:百度知道 编辑:UC知道 时间:2024/06/17 00:57:37
<body topmargin="0">
<div align="center">
<center>
<table border="0" width="700" cellspacing="0" cellpadding="0">
<%
if Not(rst.bof and rst.eof) then'判别数据表中是否为空记录
NumRecord=rst.recordcount
rst.pagesize=10
NumPage=rst.Pagecount
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
end if
if Cint(Trim(request("page")))>Cint(NumPage) then NoncePage=NumPage
end if
else
NumRecord=0
NumPage=0
NoncePage=0
end if
%>
<table border="1" width="700" bordercolorlight="#000000" cellspacing="0" cellpadding="5" bordercolordark="#FFFFFF">
&

<%if Not(rst.bof and rst.eof) then
rst.move (Cint(NoncePage)-1)*20,1
for i=1 to rst.pagesize
%>
改为
<%if Not(rst.bof and rst.eof) then
rst.move (Cint(NoncePage)-1)*10,1
for i=1 to rst.pagesize
%>

if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=info_manager?page="&NoncePage+1&">下一页</a>| |<a href=info_manager?page="&NumPage&">尾 页</a>|"
改为
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=info_manager.asp?page="&NoncePage+1&">下一页</a>| |<a href=info_manager.asp?page="&NumPage&">尾 页</a>|"