主题:  helpme!!!!

coping

职务:普通成员
等级:1
金币:0.0
发贴:2
注册:2001/7/26 14:28:52
#12001/7/26 14:32:37


各位高手 请问为什么我这一段编码,有问题!是一个分页显示的问题
直接在地址栏输入SEL.ASP?PAGE=2就没有问题可是我作的上下页的连接就没用为什么!!!





 
























  书店主页 | 登陆/注册 | 购物车/结账 | 订单查询 |帮助
 



您的位置是:----数据查询------ <添加至收藏夹>




<%
Myself = Request.ServerVariables("PATH_INFO")
sel = request("select")
key = request("key")
sql= "Select * From book where " & sel & " like '%" & key &"%'"
Set rs = GetMdbstaticRecordset("book.mdb",sql)
rs.PageSize = 10
%>

<%

Page = CLng(Request("Page"))
If Page < 1 Then Page = 1
If Page > rs.PageCount Then Page = rs.PageCount
ShowOnePage rs, Page
%>



Method=post>

<%If Page <> 1 Then ' 如果不是位于第一页%>
?Page=1>第一页
?Page=<%=(Page-1)%>>上一页
<%End If
If Page <> rs.PageCount Then ' 如果不是位于最后一页
%>
?Page=<%=(Page+1)%>>下一页
?Page=<%=rs.PageCount%>>最后一页
<%End If%>

输入页次:
页次:<%=Page%>/<%=rs.PageCount%>




每页显示15条 1/1 << <1 >>