求一个分页的写法问题,没有思路了,高手指点一下,或是帮改一下~~
........
if isno = " " or isno = "1 " then
sql = "zjreport " & cname & ", " & sdate & ", " & edate
elseif isno = "2 " then
sql = " zjreport_case " & cname & ", " & sdate & ", " & edate
end if
'response.write sql
rs.open sql,conn,3,1
if rs.eof then
response.write " <tr bgcolor=#ebe9ed> <td colspan=18> <hr size=1> <font color=#FF0000> 没有符合条件的记录,请再次确认您的检索条件! </font> </td> </tr> </table> "
response.end
end if
PageSize = request.Cookies( "PageSize ")
if not IsNot(PageSize, "n ") then PageSize = DefaultPageSize
rs.pagesize = PageSize
PageCount = rs.PageCount
PageNo = request( "PageNo ")
if PageNo = " " or CInt(PageNo) < 1 then PageNo = 1
if CInt(PageNo) > PageCount then PageNo = PageCount
rs.absolutepage = PageNo
'------------------------------共用的显示代码(代码本身无错,调试好了)
if not rs.eof then
%>
<tr>
<%for x=0 to rs.fields.count-1%>
<td class=LoginButtom> <%response.write rs.fields(x).name%>
</td>
<%next%>
</tr>
<%
i = 0
while not rs.eof and i < rs.pagesize
%>
<tr>
<%for x=0 to rs.fields.count-1%>
<td height= "29 " class= "bluefont "> <%response.write rs.fields(x).value%> </td>
<%next%>
</tr>
<%
rs.movenext
i = i + 1
wend
end if
%>
<%
rs.close
set rs = nothing
conn.close
set conn = nothing
%>
'--------------------------
</table>
<table class=MainBlock cellSpacing=0 cellPadding=0 width= "95% " border=0 alig