asp搜索分页显示不政常,第一页可以正常显示,可点第二页就变成全部数据的第二页了,以此类推. 15
<%thispagenum=20thispagenumshow=20rsa.PageSize=thispagenumifRequest.QueryString("page...
<%
thispagenum=20
thispagenumshow=20
rsa.PageSize=thispagenum
if Request.QueryString("page")<>"" then
curpage=cint(Request.QueryString("page"))
else
curpage=1
end if
%>
其他代码......
<%
thispagenum=thispagenum-1
rsa.movenext
loop
end if
rsa. close
%><%
sqlaa="select * from 表名 where 搜索条件
rsa.open sqlaa,cn,1,1
''''''''''''
pagenum=rsa.PageCount
if curpage>pagenum then
curpage=pagenum
end if
rsa.AbsolutePage =curpage
'''''''''''''''''''''''''''
if rsa.eof then
response.write "<script>alert('没有<"&cxmohuwork&">的模糊匹配纪录!');history.back();</script>"
else
%>
<%
thispagenum=thispagenum-1
rsa.movenext
loop
end if
rsa. close
%><%
Response.Write thispagenumshow&"条/页 | "
for ii=1 to pagenum
if ii=curpage then
Response.Write "[<b><font color=red >" & ii & "</font></b>] "
else
Response.Write "<b><a name=go href=?page=" & (ii) & "&表id="& 表id &"&查询条件等" >" & ii & "</a></b> "
end if
next
%> 展开
thispagenum=20
thispagenumshow=20
rsa.PageSize=thispagenum
if Request.QueryString("page")<>"" then
curpage=cint(Request.QueryString("page"))
else
curpage=1
end if
%>
其他代码......
<%
thispagenum=thispagenum-1
rsa.movenext
loop
end if
rsa. close
%><%
sqlaa="select * from 表名 where 搜索条件
rsa.open sqlaa,cn,1,1
''''''''''''
pagenum=rsa.PageCount
if curpage>pagenum then
curpage=pagenum
end if
rsa.AbsolutePage =curpage
'''''''''''''''''''''''''''
if rsa.eof then
response.write "<script>alert('没有<"&cxmohuwork&">的模糊匹配纪录!');history.back();</script>"
else
%>
<%
thispagenum=thispagenum-1
rsa.movenext
loop
end if
rsa. close
%><%
Response.Write thispagenumshow&"条/页 | "
for ii=1 to pagenum
if ii=curpage then
Response.Write "[<b><font color=red >" & ii & "</font></b>] "
else
Response.Write "<b><a name=go href=?page=" & (ii) & "&表id="& 表id &"&查询条件等" >" & ii & "</a></b> "
end if
next
%> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询