| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 445 人关注过本帖
标题:帮忙!!!!!!!!
只看楼主 加入收藏
半点心
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2004-12-17
收藏
 问题点数:0 回复次数:0 
帮忙!!!!!!!!

这是用来显示“分类项”和“各分类详细”的面页,各位帮忙看看哪里出了问题!!刚开始时一切正常,但显示某一分类详细时,分页就出了问题,主要是 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>

[此贴子已经被作者于2005-6-20 0:08:23编辑过]

2005-06-20 00:07
快速回复:帮忙!!!!!!!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.058003 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved