asp内容分页
- http://blog.gufang.org/
 - 2011/2/26 10:55:26
 - 来源:Gufang's Private Space
 - 点击:
 
acticlepage=int(Trim(request("acticlepage")))
if acticlepage="" then acticlepage=0
Set rs_aboutus = Server.CreateObject("ADODB.Recordset")
sql="select Content from Aboutus where Title='"&Title&"'"
rs_aboutus.open sql,conn,1,3
content=rs_aboutus("content")
contentArry=split(content,"<SPAN id=page></SPAN>")'这是文章分页标志,只以手动在原文添加
if ubound(contentArry)<1 then '当没有分页时正常显示
 response.Write(content)
 else 有分页时,按分页显示
 response.Write contentArry(acticlepage)
 response.Write("<hr><center>")
 if acticlepage=0 then
 response.Write "<a href=?Title="&Title&"&acticlepage="&acticlepage+1&">下一页</a>"
 else
 if acticlepage>=ubound(contentArry) then
 response.Write "<a href=?Title="&Title&"&acticlepage="&acticlepage-1&">上一页</a>"
 else
 response.Write "<a href=?Title="&Title&"&acticlepage="&acticlepage-1&">上一页</a>  "
 response.Write "<a href=?Title="&Title&"&acticlepage="&acticlepage+1&">下一页</a>"
 end if
 end if 
 response.Write("</center>")
 end if
if acticlepage="" then acticlepage=0
Set rs_aboutus = Server.CreateObject("ADODB.Recordset")
sql="select Content from Aboutus where Title='"&Title&"'"
rs_aboutus.open sql,conn,1,3
content=rs_aboutus("content")
contentArry=split(content,"<SPAN id=page></SPAN>")'这是文章分页标志,只以手动在原文添加
if ubound(contentArry)<1 then '当没有分页时正常显示
发表评论(0)











