翻页参数该怎么传递,怎么写?

suofe 2004-04-01 04:35:39
大家顺便帮我看看这代码哪里有错
<form name="searchsoft" method="POST" action="index.asp">
<p class="text1">查找部门:
<font size="2" class="t4">
<select name="sbbcd1" size="1" class="P9" id="shibie1">
<option value="1">显示全部</option>
<option value="2">营销部</option>
......
<option value="1F">离退休管理工作部(与工会工作部合署办公)</option>
</select>
</font>
<input class=buttonface type="submit" value="查 询" name="title">
</p>
</form></td>
</tr>
<tr>
<td> 
<!--#include file="conn1.asp"-->
<%
dim PageCount
dim pgsz
dim currentpage
dim n
pgsz=10
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
</td>
</tr>
<tr>
<td><table width="100%" cellpadding="0" border="0" style="border-collapse: collapse" bordercolor="#111111" cellspacing="0" align="center">
<%
if request.Form("searchsoft").value=1 then
sql="select * from job order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
else
sql="select * from job where sbccd1='" & request.Form("searchsoft").value& "' order by id desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1
end if
if rs.eof and rs.bof then
response.write "对不起,您查找的栏目暂时没有内容!"
else
rs.PageSize = pgsz
PageCount = rs.PageCount
If rs.PageCount < currentPage Then
rs.AbsolutePage = rs.PageCount
Else
rs.AbsolutePage = currentPage
End If
%>

<tr class="blank1">
<td height="1" colspan="2" class="blank1" background="../images/three04.gif"> </td>
</tr>

<tr >
<td height="1" colspan="2" class="blank1" background="../images/three04.gif"><table width="100%" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#FFFFFF" bgcolor="#f6f6f6" style="border-collapse: collapse">
<tr align="center" bgcolor="#e6e6e6">
<td width="4%" rowspan="2" class="text1">序号</td>
<td colspan="3" class="text1">卡号</td>
<td width="8%" rowspan="2" class="text1">资产名称</td>
........
<td width="8%" rowspan="2" class="text1">所在具体位置</td>
</tr>
<% dim i
i=0
do while not rs.eof%>
<tr align="center" class="text1">
<td class="about01"><%=rs("id")%></td>
<td class="about01">01040000</td>
......
<td class="job01"><%=rs("sbefg")%></td>
</tr>
<% i=i+1
if i>=pgsz then exit do
rs.movenext
loop
%>
</table></td>
</tr>

<tr>
<td height="25" colspan="2" class=text1 align=right>
<%
if currentPage<2 then
response.write " 首页 | 上一页"
else
response.write "<a href=index.asp?page=1>首页</a> | "
response.write "<a href=index.asp?page="&cstr(currentPage-1)&">上一页</a>"
end if
%> | <%
if pagecount-currentPage<1 then
response.write "下一页 | 尾页"
else
response.write "<a href=index.asp?page="&curpage+1&">下一页</a> | "
response.write "<a href=index.asp?page="&pagecount&">尾页</a>"
end if
%>
这里的翻页参数该怎么写呢,传的是下拉框的选值吗,该怎么写?
...全文
19 点赞 收藏 回复
写回复
回复
切换为时间正序
请发表友善的回复…
发表回复

还没有回复,快来抢沙发~

发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
社区公告
暂无公告