asp+access搜索后怎样才能保留全部的搜索条件
asp网页,上面一个搜索条,下面显示搜索结果。输入搜索条件后,点击“搜索”按钮,然后页面刷新了一下,下面就显示出了搜索的结果,但是搜索条件却全都被清空了,我想在点击按钮之后即出现了结果,而刚刚输入的搜索条件也能保留下来,就像百度搜索那样.怎样才能实行呢?我是菜鸟最好能给完整代码.,谢谢!!! 如果四个条件都选的话就全都保存下来.
代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>文件</title>
</head>
<body bgcolor="#ffffff">
<table width=690 border="0" cellspacing="0" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF" width="100%" style="word-break:break-all" align="center">
<tr>
<td width="580" align="center" colspan="7">
<form method="POST" name="form1" action=sou.asp>
<P><font style="font-size: 14px " color="0000ff" align="left">搜索内容</font>
<input type="text" name="cxsj" size="15">
<select name="bb" id="Searc_bb">
<option selected="selected" value="">所在属省份</option>
<option value="广东">广东</option>
<option value="广西">广西</option>
<option value="上海">上海</option>
</select>
<select name="dd" id="Search_dd">
<option selected="selected" value="">按等级</option>
<option value="10001">一级</option>
<option value="251">二级</option>
<option value="250">三级</option>
</select>
<select name="SearchUC" id="Search_UC">
<option selected="selected" value="">默认排序</option>
<option value="251">按价格从低到高</option>
<option value="99999991">等级从高到低</option>
<option value="250">按价格从高到低</option>
</select>
<input type="submit" value="本站搜索" name="B1">
</form>
</tr>
</table>
<TABLE width=890 bgColor=#FFFFFF border=0 bordercolor="0" align="center">
<TR>
<TD>
<%
cxsj=request.form("cxsj")
bb=request.form("bb")
dd=request.form("dd")
SearchUC=request.form("SearchUC")
dim pageCount
page = cint(request("page"))
set conn=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
conn.open "DBQ=" & server.mappath("data.mdb") & ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
sql="select * from tade where 1=1 "
if cxsj <> "" then
sql=sql&"and aa like '%"&cxsj& "%'"
end if
if bb<>"" then
sql=sql&"and bb = '%"&bb&"%'"
end if
if dd<>"" then
sql=sql&"and dd = '%"&dd&"%'"
end if
if SearchUC="" then
sql=sql&" order by id desc"
end if
if SearchUC="251" then
sql=sql&" order by cc asc"
end
if SearchUC="99999991" then
sql=sql&" order by dd desc"
end
if SearchUC="250" then
sql=sql&" order by cc desc"
end
rs.open sql,conn,3,3
if rs.bof then
errmsg=errmsg+"<br>"+"<li>"+keyword+"没有记录,请返回!!"
response.write errmsg
response.end
end if
RS.PageSize=8
pageCount = cint(rs.pageCount)
if page = 0 then
page =1
end if
RS.AbsolutePage = page
x=1
WHILE NOT RS.EOF AND NumRows<RS.PageSize
%>
<tr>
<td width="160">
<div align="center"><a target="_blank" href="<%=rs("aa")%>">
</td>
</tr></div>
</table></div>
<%RS.MoveNext
NumRows=NumRows+1
WEND%>