设为首页收藏本站

新微赢技术网

 找回密码
 注册
搜索
热搜: 回贴
查看: 59|回复: 1
打印 上一主题 下一主题

帮忙!!!!!!!!

[复制链接]
跳转到指定楼层
1#
发表于 2010-1-13 01:57:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
这是用来显示“分类项”和“各分类详细”的面页,各位帮忙看看哪里出了问题!!刚开始时一切正常,但显示某一分类详细时,分页就出了问题,主要是 rs.AbsolutePage=page 重新赋值不起作用,为什么这样,如何解决???
--------------------------------------------------------------------------------
<!--#include file="conn.asp"--> <%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <head><meta http-equiv='Cache-Control' content='no-cache'/> </head> <card id="main" title="分类导航目录"> <p> <% dim page,labid page=request.querystring("page") labid=request.querystring("labid") if page="" then page=1 response.write page if labid="" then call showlab() else call showlabs() end if '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function showlab() dim sql,i sql="SELECT * from lab order by labid desc" set rs=server.CreateObject("adodb.recordset") rs.open sql,conn,1 if not(rs.eof and rs.bof) then do while not rs.eof response.Write "<a href='?labid="& rs(2) &"'>" response.Write rs(1) & "</a><br/>" rs.movenext i=i+1 if i>9 then exit do end if loop else response.write "还未设置分类!<br/>" end if
rs.close set rs=nothing
end function ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' function showlabs() dim pageCount,recordcount
sql="select * from naro where lab="&labid&" order by addtime desc" set rs=server.CreateObject("adodb.recordset") rs.open sql,conn,1 rs.PageSize=10 PageCount=rs.PageCount if page>PageCount then page=PageCount if not(rs.eof and rs.bof) then rs.AbsolutePage=page i=1 do while not rs.eof response.write "<a href='show.asp?flid="& rs(0) &"'>" response.Write rs(1)&"</a><br/>" rs.movenext i=i+1 if i>10 or rs.eof then exit do loop response.Write rs.absolutepage rs.close set rs=nothing response.Write "<a href='?page="&(page-1)&"" response.write server.htmlencode ("&") response.write "labid="&labid&"'>上一页</a>|" response.Write "<a href='?page="&(page+1)&"" response.write server.htmlencode ("&") response.write "labid="&labid&"'>下一页</a><br/>"
else response.write "该分类还未有记录<br/>"
end if end function %> --------------<br/> <a href='lab.asp'>分类导航目录</a><br/> <a href='../index.asp'>网站首页</a><br/></p> </card> </wml>
您需要登录后才可以回帖 登录 | 注册

本版积分规则

申请友链|小黑屋|最新主题|手机版|新微赢技术网 ( 苏ICP备08020429号 )  

GMT+8, 2024-11-19 17:24 , Processed in 0.100540 second(s), 9 queries , Gzip On, Memcache On.

Powered by xuexi

© 2001-2013 HaiAn.Com.Cn Inc. 寰耽

快速回复 返回顶部 返回列表