有关翻页的代码
ahuu 2003-09-12 07:11:42 rs.open strSQL1,conn,1,2
rs.pagesize = 4 '//令每夜显示4条记录
if not rs.eof then '//如果找到满足条件的记录
total = cstr(rs.pagecount)
currentpage = clng(request("currentPage"))
'//若按下下拉列表框右边的“确定”按钮
if request.Form("cmdOk")="确定" then
currentpage = request.Form("txtP") '//将当前页指定为下拉列表框中的数值
end if
if currentpage="" then
currentpage = 1 '//显示第一页的内容
end if
'处理非法页码问题
if currentpage="" or currentpage<1 then currentpage=1 end if
if currentpage>rs.pagecount then currentpage=rs.pagecount end if
rs.AbsolutePage = currentpage
sum = 0 初始化sum(总行数)变量的值
<table width="762" border="0" bgcolor="#CCCCCC">
<form name="queryForm" method="post" action="orderCheck.asp">
<input type="hidden" name="temPage" value="<%= currentpage %>">
<tr>
<td>
<%if currentpage > 1 then%><a href="orderCheck.asp?currentpage=<%=currentpage-1%>">[上一页]</a><%else%>[上一页]<%end if%>
<%if currentpage < rs.pagecount then%><a href="orderCheck.asp?currentpage=<%=currentpage+1%>">[下一页]</a><%else%>[下一页]<%end if%>
</td>
</tr>
</form>
</table>
在显示时,我用的是:while ((not rs.eof) and (sum < rs.pagesize)).....wend
问题是:点击下一页时,总是显示第一页,没翻过去
怎么办呢?是不是rs.AbsolutePage没接收到参数currentpage的值呢?