社区
ASP
帖子详情
在ASP中数据较多时怎样实现分页显示?
ask999
2003-11-10 11:35:35
如题,请给出完整代码.谢谢
...全文
57
6
打赏
收藏
在ASP中数据较多时怎样实现分页显示?
如题,请给出完整代码.谢谢
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
6 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
blueice2002
2003-11-10
打赏
举报
回复
http://expert.csdn.net/Expert/topic/2437/2437534.xml?temp=.4696009
junsisi
2003-11-10
打赏
举报
回复
http://www.5ienet.com/guestbook/default.asp
看看这个,下头有源码的下载
俺自已觉着这个是俺写过的最好的分页代码~~
aimei2003
2003-11-10
打赏
举报
回复
1。
<%
function showpage(totalnumber,maxperpage,filename)
Response.Write("<tr><td><br>")
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
if n<=1 then exit function
response.write "<p align='center'> "
if CurrentPage<2 then
response.write "<font color='#000080'>首页 上一页</font> "
else
response.write "<a href="&filename&"?page=1&fid="& fid & "&sid=" & sid & "&tid=" & tid &">首页</a> "
response.write "<a href="&filename&"?page="¤tPage-1&"&fid="& fid & "&sid=" & sid & "&tid=" & tid & ">上一页</a> "
end if
if n-currentpage<1 then
response.write "<font color='#000080'>下一页 尾页</font>"
else
response.write "<a href="&filename&"?page="& (CurrentPage+1) & "&fid=" & fid & "&sid=" & sid & "&tid=" & tid&">"
response.write "下一页</a> <a href="&filename&"?page="&n&"&fid="& fid & "&sid=" & sid & "&tid=" & tid &">尾页</a>"
end if
response.write "<font color='#000080'> 页次:</font><strong><font color=red>"¤tPage&"</font><font color='#000080'>/"&n&"</strong>页</font> "
response.write "<font color='#000080'> 共<b>"&totalnumber&"</b>篇文章 <b>"&maxperpage&"</b>篇文章/页</font> "
' response.write " <font color='#000080'>转到:</font><input type='text' name='page' size=4 maxlength=10 class=smallInput value="¤tpage&">"
response.write "</span></p>"
Response.Write("</td></tr>")
end function
%>
2。
<% dim page,totle,no,n,ye
totle=0
n=20
pagesize=n
page=request("no")
no=rs.absolutepage
rs.movefirst
do while not rs.eof
totle=totle+1
rs.movenext
loop
ye=int(totle/n*-1)*-1
if page<1 then
page=1
end if%>
<% rs.movefirst
rs.move((page-1)*20)
y=((page-1)*20)
while y<((page-1)*20)+20 and y<totle
%>
<table border="0" width="750" bgcolor="">
<td bgcolor="#FFFFCC">
<font size="3" color="#3300FF"><b><img src="dafeiliu/<%=rs("image")%>" alt="个性头像">留言者:<font size="4" color="#FF00CC"><%=rs("name")%></font>:于<%=rs("time")%>,<font size="4" color="#FF0000">Email:<a href="mailto:<%=rs("email")%>"></font></b><img src="pic/gif1/mail.gif" width="40" height="32" border="2" alt="信箱"></font></a> <a href="<%=rs("page")%>" target="_blank"><img src="pic/gif1/page.gif" width="40" height="32" border="0" alt=""></a>
<p><font size="4" color="#FF00CC"><%=rs("name")%></font>的留言是:<br>
<table border="2" bordercolor="#FF0066">
<tr>
<td width="750" height="80"><%=rs("word")%></td>
</tr>
</table>
</p>
</table>
<% rs.movenext
y=y+1
wend
rs.close %><br>
<%response.write"<a href=dafei3.asp?no="&page-1&"><font size=3 color=#CCCC66>上一页</font></a>"%>共有留言<font size="4" color="#FF0000"><%=totle%></font>条 <font size="4" color="#FF66FF"><%=ye%></font>页 当前是第<font size="4" color="#33FF33"><%=page%></font>页
<%response.write"<a href=dafei3.asp?no="&page+1&"><font size=3 color=#FF00FF>下一页</font></a>"%><p>
DBApower
2003-11-10
打赏
举报
回复
我这里我多个最简单的分页
并且有我写的最简单的分页
比起网上写的繁杂的难理解的分页不止要好多少倍
your e-mail is?
MY e-mail : seeyouknowme@163.com
popcode
2003-11-10
打赏
举报
回复
搜索一下,多的是!!!
PS:自己动手丰衣足食!
ask999
2003-11-10
打赏
举报
回复
谢谢seeyouc()!
我的MAIL: ydj@ynadult.com
asp
分页
显示
本文介绍
ASP
分页
显示
方法,主要有一次性读入记录和按需读取两种。以
ASP
BBS程序为例,使用第一种方法
实现
分页
。详细讲解Recordset对象的属性和方法,如BOF、EOF、Move等,并给出
实现
分页
显示
的程序代码,还提到用隐藏form传递页码参数。
ASP
分页
显示
详论
本文介绍
数据
库查询结果
分页
显示
的两种主要方法,对比其在不同
数据
量和在线人数下的执行效率。以
ASP
BBS程序为例,采用第一种方法
实现
分页
。还详细讲解Recordset对象的属性和方法,并给出简单BBS应用程序的
分页
显示
代码。
ASP
分页
详解
本文介绍了在
ASP
中
实现
数据
库
分页
显示
的方法,主要通过ADO Recordset对象的属性和方法来
实现
分页
功能,适用于小型
数据
库及较低并发访问场景。
asp
mysql
分页
_
asp
数据
库编程:ADO 存取
数据
库时如何
分页
显示
本文介绍了ADO在存取
数据
库时如何
实现
分页
显示
,主要通过设置PageSize属性来划分逻辑页,结合RecordCount属性确定总页数,AbsolutePage属性定位到指定页。文章以
ASP
为例,详细解析了
实现
分页
显示
的步骤,并提供了一段BBS程序的示例代码,展示了如何在实际应用
中
运用这些概念和技术。
深入分析讲解动态网页技术
ASP
分页
显示
本文介绍在
ASP
中
实现
BBS帖子
分页
显示
的方法,重点讲解利用ADO Recordset对象及其属性完成
分页
功能的技术细节。
ASP
28,403
社区成员
356,946
社区内容
发帖
与我相关
我的任务
ASP
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
复制链接
扫一扫
分享
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章