基本信息
源码名称:asp翻页通用 示例代码下载
源码大小:1.19KB
文件格式:.rar
开发语言:ASP
更新时间:2016-02-01
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 1 元 
   源码介绍


<%
Const PAGESIZE=10
Const PARTSIZE=10
dim pagecount,page,Spage,Epage,recordcount,i
page = request.querystring("page")
if page = "" or IsNull(page) then page = 1
if not IsNumeric(page) then page = 1
page = Cint(page)
set rs = server.CreateObject ("Adodb.recordset")
sql="select * from tsm_news1 where aid=10 order by id desc"
rs.open sql,conn,1,1
recordcount = RS.RecordCount
RS.PageSize = PAGESIZE
pagecount = RS.PageCount
if page < 1 then
    page = 1
elseif page > pagecount then
    page = pagecount
end if

if RS.EOF  then
    Response.Write("<center><font color=red>目前还没有内容!</font>")
else
  if recordcount > 0 then RS.AbsolutePage = page
  for i = 1 to PAGESIZE
  if RS.EOF then exit for
  %>
<!----------------->
<%=rs("title")%>
<!----------------->
<%
RS.MoveNext()
if RS.EOF then exit for
next
end if
%>

<!--#include file="page.asp"-->