我来试试看:
<%
set rsc=server.createobject("adodb.recordset")
sqlc="select * from news where class='"&rs("class")&"' order by id desc"
rsc.open sqlc,conn,1,1
Response.write "
"
rsc.PageSize = 10 'pagesize属性指定了每页要显示的记录条数
Page = CLng(Request("Page")) ’string型转化为long型
If Page < 1 Then Page = 1
If Page > rsc.PageCount Then Page = rsc.PageCount
If Page <> 1 Then
Response.Write "第一页�"
Response.Write "上一页�"
End If
If Page <> rsc.PageCount Then
Response.Write "下一页�"
Response.Write "最后一页�"
End If
Response.write "页码:" & Page & "/" & rsc.PageCount & ""
rsc.AbsolutePage = Page '把页码赋给absolutepage属性从而知当前页的首条记录号
For iPage = 1 To rsc.PageSize
%>
|
<%=rsc("time")%> |
<%=rsc("by")%> |
<%
rsc.MoveNext
If rsc.EOF Then Exit For
Next
%>
|