asp搜索后form条件丢失
<%Dimorderbyorderby=Request("orderby")iforderby<>""theniforderby="iscome"thensqlstr="...
<%Dim orderby
orderby=Request("orderby")
if orderby<>"" then
if orderby="iscome" then
sqlstr=" and iscome=1 "
end if
if orderby="q" then
sqlstr=" and ytypeid=11 "
end if
if orderby="s" then
sqlstr=" and ytypeid=8 "
end if
if orderby="g" then
sqlstr=" and ytypeid=10 "
end if
if orderby="t" then
sqlstr=" and ytypeid=12 "
end if
if orderby="w" then
sqlstr=" and ytypeid not in (1,11,8,10,12)"
end if
if orderby="z" then
sqlstrz=" and Uptime like '%"&date()-1&"%'"
end if
end if
if Request("ok")="查找" then
Dim keyuser,tel,bz
keyuser=request("userkey")
tel=request("tel")
bz=request("bz")
sqlkey="and Cname like '%"&keyuser&"%'"
sqlkeya="and Cphone like '%"&tel&"%'"
sqlkeyb="and Zdysr like '%"&bz&"%'"
end if
If Request("ok")="查询" Then
Dim STime,ETime,StrTime
STime=Request("Hangban_Time1")
ETime=Request("Hangban_Time2")
If STime="" or ETime="" Then
Response.Write "<script language=javascript>alert('请输入查询时间段!');</script>"
Response.write "<meta http-equiv=""refresh"" content=""0;url=Xj_YuYueList.Asp"">"
Response.End()
End if
sqltime=" and (uptime between #"&""&STime&""&"# and #"&""&ETime&""&"#)"
End if
我用的orderby=来确定查询语句,然后在进行调用,可通过form表达查询后,总是把input里的数据丢失,下一页老是显示总数据,请问高人怎么破解~ 展开
orderby=Request("orderby")
if orderby<>"" then
if orderby="iscome" then
sqlstr=" and iscome=1 "
end if
if orderby="q" then
sqlstr=" and ytypeid=11 "
end if
if orderby="s" then
sqlstr=" and ytypeid=8 "
end if
if orderby="g" then
sqlstr=" and ytypeid=10 "
end if
if orderby="t" then
sqlstr=" and ytypeid=12 "
end if
if orderby="w" then
sqlstr=" and ytypeid not in (1,11,8,10,12)"
end if
if orderby="z" then
sqlstrz=" and Uptime like '%"&date()-1&"%'"
end if
end if
if Request("ok")="查找" then
Dim keyuser,tel,bz
keyuser=request("userkey")
tel=request("tel")
bz=request("bz")
sqlkey="and Cname like '%"&keyuser&"%'"
sqlkeya="and Cphone like '%"&tel&"%'"
sqlkeyb="and Zdysr like '%"&bz&"%'"
end if
If Request("ok")="查询" Then
Dim STime,ETime,StrTime
STime=Request("Hangban_Time1")
ETime=Request("Hangban_Time2")
If STime="" or ETime="" Then
Response.Write "<script language=javascript>alert('请输入查询时间段!');</script>"
Response.write "<meta http-equiv=""refresh"" content=""0;url=Xj_YuYueList.Asp"">"
Response.End()
End if
sqltime=" and (uptime between #"&""&STime&""&"# and #"&""&ETime&""&"#)"
End if
我用的orderby=来确定查询语句,然后在进行调用,可通过form表达查询后,总是把input里的数据丢失,下一页老是显示总数据,请问高人怎么破解~ 展开
1个回答
2014-04-18
展开全部
试试把查询表单的method="post" 改成method="get"。
在查询处理页面,用request.querystring方法接收。
在分页的链接上把接收到的参数都附加上
在查询处理页面,用request.querystring方法接收。
在分页的链接上把接收到的参数都附加上
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询