翻页过程中出现的问题?
我需要根据单位翻页,所以加了红色部分的代码.记录的条数和页码是正确的,但在点击下一页后 显示记录为零?这是错在哪?
<%
if rs.EOF then Response.Write " <p align=center> <font size=6 color=#FF0000 class=info> <br> <br> <br>记录为零 </font>"
if not rs.EOF then
pagesize=4
rs.PageSize = pagesize
page=request("page")
if page="" then page=1
if cint(page)>rs.pagecount then page=rs.pagecount
if page <>0 then rs.AbsolutePage = page
for i=1 to pagesize
if rs.EOF then exit for
%>
'中间略
<% rs.movenext '读下一条记录
next
Response.Write " <form onsubmit='return(testforms(this));'action=syqyadmin.asp?danwei='"&danwei&"' method=post id=form2 name=form2>"
Response.Write " <table width=80% class=query> <tr> <td nowrap> <font class=page>"
if cint(page) <>1 then Response.Write " <a href='syqyadmin.asp?danwei="&danwei&"page=1'>第一页 </a>?"
if cint(page)>1 then Response.Write " <a href='syqyadmin.asp?danwei="&danwei&"page=" & page-1 & "'>上一页 </a>?"
if cint(page) <>rs.pagecount then Response.Write " <a href='syqyadmin.asp?danwei="&danwei&"page=" & page+1 & "'>下一页 </a>?"
if cint(page) <>rs.pagecount then Response.Write " <a href='syqyadmin.asp?danwei="&danwei&"page=" & rs.pagecount & "'>最后页 </a>?"
Response.Write "转至 <input name=page size=2>"
Response.write "页 <input type=submit value=go id=submit1 name=submit1>?第" & page & "页/共" & rs.pagecount & "页"
Response.write "?本页" & i-1 & "条/记录总数:" & rs.RecordCount & "条 </form>"
end if
%>
[[it] 本帖最后由 lcd2105 于 2008-4-16 18:28 编辑 [/it]]