你说的实际上是分页功能的实现!!如何说呢??一句话不太容易说清楚!!
下面是一段有关分页的代码!!你看看,如果看动了!!你说的问题就解决了!
'数据库一打开就跟上这段代码!!分页设置
<%
rs_lar.open sql,conn,3,2
if rs_lar.eof and rs_lar.bof then str="错误!"
end if
%>
'从这里开始分页代码!!
if str="" then
rs_lar.PageSize=8
pages=rs_lar.pagecount '纪录页数
records=rs_lar.recordcount
currentpage=request("currentpage")
if currentpage="" or currentpage<1 then currentpage=1
currentpage=cint(currentpage)
if currentpage>pages then currentpage=pages
rs_lar.absolutepage=currentpage
else
currentpage=1
records=0
pages=1
end if
%>
'分页导航
第<%=currentpage%>页 共<%=Pages%>页 |
<%if pages>1 then%>
转到页码:[ <%for p=1 to pages%> style="color:red"<%end if%> href="searchout.asp?currentpage=<%=p%><%=hrefdate%>"><%=p%> <%if p/30=0 then%> <%end if%> <%next%> ] |
<%end if%>
'显示在表格里
<%linenumber=rs_lar.pagesize%>
<%do while (not rs_lar.eof) and (line
<%=rs_lar("netname")%> |
<%=rs_lar("sex")%> |
<%=rs_lar("home")%> |
<%=rs_lar("britherday")%> |
<%=rs_lar("netcall")%> |
<%=rs_lar("ip")%> |
<%=rs_lar("date")%> |
<%=rs_lar("renqi")%> |
<%rs_lar.movenext%>
<%line=line+1%>
<%loop%>
<%rs_lar.close%>