我的分页显示怎么了????????
我试着用asp+fso生成静态页;但是加上分页就显示不出来了,
下面是我的代码,
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp"-->
<%
page=request.QueryString("page")
if page="" then page=1
if len(page)>4 then page=1
if not isnumeric(page) then page=1
set rs=server.CreateObject("adodb.recordset")
sql="select * from smlb"
rs.pagesize=2
rs.open sql,conn,3,2
rs.absolutepage=cint(page)
aa=1
set fs=server.CreateObject("scripting.filesystemobject")
aa=""&date()&""&"_"&page&".html"
set fn=fs.createtextfile(server.MapPath(""&aa&""))
fn.writeline "<html>"
fn.writeline"<head><meta http-equiv=Content-Type content=text/html; charset=gb2312><title>列表</title></head>"
fn.writeline "<body>"
a5=rs.recordcount
do while not rs.eof and aa<rs.pagesize
a1=rs("sm"):a2=rs("dw"):a3=rs("url"):a4=rs("time")
fn.writeline a2
fn.writeline "<a href="&a3&" target=_blank>"&a1&"</a>"
fn.writeline "加入时间:"& a4 &"<br>"
aa=aa+1
rs.movenext
loop
fn.writeline "共"&a5&"条记录"
fn.writeline "页次"&page&"/"&rs.pagecount
for i=1 to rs.pagecount
if i=cint(page) then
fn.writeline "[<font color=red>"&i&"</font>]"
else
fn.writeline "[<a href=aaa.asp?page="&i&">"&i&"</a>]"
end if
next
fn.writeline "</body></html>"
fn.close
response.redirect aa%>
麻烦各位老大,给看看那出错了,如果去了 aa<rs.pagesize 和aa=a+1 就可以了,