象牙包金边图片:求分页显示的代码

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 18:17:27
分页了,但是显示记录呢?记录集呢?

page=request.querystring("page")
if page="" then page=1
if not(isnumeric(page)) then page=1
if page<1 then page=1
page=int(page)

rs.pagesize=10
totalrec=rs.recordcount
totalpage=rs.pagecount
if page>totalpage then page=totalpage
rs.absolutepage=page
rs.cachesize=rs.pagesize
n=1

共 <font color=red><%=totalpage%></font> 页
共<font color=red>( <%=totalrec%> )</font>条信息 第 <%=page%> 页 <font color=666666 class="r2"> 〖
<%
i=0
do while i<totalpage
%>
<a href=cpgl.asp?page=<%=i+1%> class=r2><%=i+1%></a>
<%
i=i+1
loop
%>

<%if page-1>0 then%>
<a href="kcgl.asp?page=<%=page-1%>" class="r2">上一页</a>
<%else%>
<font color=666666>上一页</font>
<%end if%>

<%if page+1<=totalpage then%>
<a href="cpgl.asp?page=<%=page+1%>" class="r2">下一页</a>
<%else%>
<font color=666666>下一页</font>
<%end if%>

这个是ASP的