asp 查询分页问题
查询之后,显示结果,点击下一页,没反应,还是在第一页
这是代码:
<!--#include file="setup.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
if len(request("keyword"))=0 then
back("请填写关键字!!")
Response.end
end if
keyword=request("keyword")
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="<%=web_key%>">
<meta name="description" content="<%=web_desc%>">
<title><%=web_name%>产品搜索</title>
<link href="images/style.CSS" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="top2.asp" -->
<table width="778" border="0" align="center" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/main_pro.jpg" width="565" height="45"></td>
</tr>
<tr>
<td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<% strsql="select * from pro_list where pro_name like '%"&keyword&"%' or pro_info like '&"&keyword&"&'"
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strsql, conn, 1, 1
total=0
total=rs.recordcount %>
<%if not rs.eof then
page=8
rs.pagesize=page
maxpage=rs.pagecount
if pageno < 1 then
pageno =1
end if
if pageno+1 >maxpage+1 then
pageno=maxpage
end if
rs.absolutePage=pageno
else
maxpage=1
end if
total = rs.RecordCount
%>
<% while not rs.eof and page>0 %>
<tr class="font">
<td width="12%" class="td_bottom"><div align="right"><img src="images/dot_m.gif" width="20" height="18"> </div></td>
<td width="88%" height="30" class="td_bottom"><a href="product_view.asp?id=<%= rs("id") %>">
<% =rs("pro_name") %>
</a> </td>
</tr>
<% if not rs.eof then
rs.movenext
end if
page=page-1
wend
rs.close
set rs=nothing
%>
</table>
<br>
<% if total=0 then %>
<table width="93%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<div align="center"><font color="#FF0000"><strong>没有找到任何与条件相符的信息!!</strong></font> [<a href="#" onclick="history.back()">返回上一页</a>]</div></td>
</tr>
</table>
<% else %>
<table width="93%" height="26" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="font">
<td width="3"></td>
<td width="195" class="zhengwen"><div align="center"><font color="#0033CC"><strong>共找到<span class="red"><%= total %></span>条符合条件的信息!!</strong></font></div></td>
<td width="336" class="zhengwen"><div align="center"> 共有<%=maxpage%>页 8条/页 目前第<%=pageno%>页 <a href="pro_search.asp?pageno=<%=pageno-1%>&keyword=<%=keyword%>">[上一页]</a> [<a href="pro_search.asp?pageno=<%=pageno+1%>&keyword=<%=keyword%>">下一页</a>]</div></td>
</tr>
<tr>
<td></td>
<td height="13"></td>
<td></td>
</tr>
</table>
<% end if %>
<p> </p></td></tr>
</table></td>
</tr>
</table>
<!--#include file="foot.asp" -->
</body>
</html>
帮忙看看啊,兄弟门,我是新手!