| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 557 人关注过本帖
标题:关于查询结果分页!
取消只看楼主 加入收藏
szp2007
Rank: 1
等 级:新手上路
帖 子:40
专家分:0
注 册:2008-2-14
结帖率:100%
收藏
 问题点数:0 回复次数:0 
关于查询结果分页!
高手帮忙看下:我想对查询结果进行分页,为什么只显示到第二页,在第二页就不显示下一页了?
<% PageSize=trim(request("pageSize"))
if PageSize<>".then
session("pageSize")=PageSize
pz=PageSize
end if
if PageSize=""then
 if session("pageSize")<>""then
 pz=session("pageSize")
 else
 pz=3
 end if
 end if
 rs.PageSize=pz
pagecount=rs.PageCount
page=int(request.QueryString ("page"))
if page<=0 then page=1
if request.QueryString("page")="" then page=1
rs.AbsolutePage=page
%>
<p align="center"><span class="style4">  &nbsp; &nbsp; &nbsp;<%=DATE%>共<%=rs.recordcount%>条记录</span>      &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;合计:

<%=total%>kg</p>
 <TABLE width=57% border=1 align="center" cellPadding=0 cellSpacing=0
            borderColorLight=#6699ff borderColorDark=#ffffff bgcolor="#FFFFFF" style="border-collapse:collapse">
  <tr>
    <td width="90" nowrap="nowrap" bgcolor="#FFCC66"><div align="center">序号</div></td>
    <td width="113" align="center" nowrap="nowrap" bgcolor="#FFCC66">乡镇</td>
    <td width="101" nowrap="nowrap" bgcolor="#FFCC66"><div align="center">村组</div></td>
    <td width="125" nowrap="nowrap" bgcolor="#FFCC66"><p align="center">日交奶量</p></td>
    <td width="112" nowrap="nowrap" bgcolor="#FFCC66"><p align="center">日期</p></td>
   </tr>
  
   <%count=0
 totalcount=0
do while not rs.eof and count<rs.pagesize %>
   <%if count Mod 2=0 then%><TR bgcolor="#E2EEFC" onMouseOver="this.style.backgroundColor='#FFDA6A'" onMouseOut="this.style.backgroundColor='#E2EEFC'">
<%end if%>
    <td height="27" align="center" valign="middle" nowrap="nowrap"><%=count+1%></td>
   
    <td align="center" valign="middle" nowrap="nowrap"><%=rs("xiangzhen")%></td>
    <td align="center" valign="middle" nowrap="nowrap"><%=rs("cun")%></td>
    <td align="center" valign="middle" nowrap="nowrap"><%=rs("rijiaonailiang")%></td>
    <td align="center" valign="middle" nowrap="nowrap"><%=rs("riqi")%></td>
    </tr>
    <%
   rs.movenext
  count=count+1
  loop
  %>
</table>

<span class="style4">共有<%=rs.recordcount%>条记录,每页显示<%=rs.pagesize%>条 ,第<%=page%>/<%=rs.pagecount%>页&nbsp;
 <%if page>1 then%>
 <a href="rijiaonai2_hz.asp?Page=<% = 1%>&xiangzhen=<%=xiangzhen%>&nian=<%=nian%>&yue=<%=yue%>&ri=<%=ri%>&id=<%=id%>">首页</a><a href="rijiaonai2_hz.asp?Page=<% = 1%>"&xiangzhen=<%=xiangzhen%>&nian=<%=nian%>&yue=<%=yue%>&ri=<%=ri%>&id=<%=id%>"></a> <a href="rijiaonai2_hz.asp?Page=<% =page -1 %>&xiangzhen=<%=xiangzhen%>&ri=<%=ri%>&nian=<%=nian%>&yue=<%=yue%>&id=<%=id%>">上一页</a><a href="rijiaonai2_hz.asp?Page=<% =page -1 %>&xiangzhen=<%=xiangzhen%>&nian=<%=nian%>&yue=<%=yue%>&ri=<%=ri%>&id=<%=id%>"></a>
 <%end if %>
 <%if page<>rs.pagecount then %>
 <a href="rijiaonai2_hz.asp?Page=<% =page + 1%>&xiangzhen=<%=xiangzhen%>&nian=<%=nian%>&yue=<%=yue%>&ri=<%=ri%>&id=<%=id%>">下一页</a><a href="rijiaonai2_hz.asp?Page=<% =page + 1%>&xiangzhen=<%=xiangzhen%>&nian=<%=nian%>&yue=<%=yue%>&ri=<%=ri%>&id=<%=id%>"></a> <a href="rijiaonai2_hz.asp?Page=<% = rs.PageCount%>&xiangzhen=<%=xiangzhen%>&nian=<%=nian%>&yue=<%=yue%>&ri=<%=ri%>&id=<%=id%>">">尾页</a><a href="rijiaonai2_hz.asp?Page=<% = rs.PageCount%>&xiangzhen=<%=xiangzhen%>&nian=<%=nian%>&yue=<%=yue%>&ri=<%=ri%>&id=<%=id%>"></a></span>
 <% end if %>
搜索更多相关主题的帖子: 查询 结果 
2008-10-21 21:47
快速回复:关于查询结果分页!
数据加载中...
 
   



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

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