ASP 长篇文章分页怎么实现!!!

来源:百度知道 编辑:UC知道 时间:2024/05/22 14:23:03
我的文章是直接从数据库调的那个字段 例如:<%=rs("art")%>

我想做分页 有没有人跟我遇到过类似的问题呀

我想做分页 有没有人有可以现实这种功能的代码呀

我对ASP不太会 有没有完整的代码呀 我的数据库名叫#db1.mdb(在根目录下),存放内容的表名叫artic,存放内容的字段叫art,存放标题的字段叫title,存放内容的页面叫从count.asp

先把这个写到页面里:

<%
Const ShowContentByPage="Yes" '文章内容是否分页显示
Const MaxPerPage_Content=15000 '每页显示大约字符数
sub AutoShow()
dim artpageid,strContent,CurrentPage
dim ContentLen,MaxPerPage,pages,i,lngBound
dim BeginPoint,EndPoint
artpageid=request("id")
strContent=rs1("Article_Content")
ContentLen=len(strContent)
CurrentPage=trim(request("page"))
if ShowContentByPage="No" or ContentLen<=MaxPerPage_Content then
response.write strContent
if ShowContentByPage="Yes" then
response.write "</p><p align='center'><font color='red'><b>[1]</b></font></p>"
end if
else
if CurrentPage="" then
CurrentPage=1
else
CurrentPage=Cint(CurrentPage)
end if
pages=ContentLen\MaxPerPage_Content
if MaxPerPage_Content*pages<Conte