访问网页出现Session Error 错误如何解决?
展开全部
neirong=request.Form("neirong") '翻页会丢失
url=""&neirong
num = Cint(request.QueryString("pNum"))
session("liebie")=request.Form("type") '翻页会丢失
session("difang")=request.Form("difang") '翻页会丢失
改成如下
<%
dim url,neirong,liebie
url=""&neirong
num = Cint(request.QueryString("pNum"))
if request.Form("type")<>"" then
session("liebie")=request.Form("type")
session("difang")=request.Form("difang")
session("neirong")=request.Form("neirong")
end if
if (session("difang"))=1 then
response.Redirect(url)
else if (session("difang"))=2 then
if session("liebie")="" then
session("liebie")=request.Form("type")
end if
if (request.QueryString("pNum"))<>100000000000000 then
sql = "select * from "&session("liebie")&" where neirong like '%"&session("neirong")&"%' order by date desc"
Set rs=server.createobject("adodb.recordset")
rs.Open sql, conn, 1, 3
if rs.Eof and rs.Bof then
Response.Write("没有数据!")
Response.end
end if
pSize = 2
%>
下面的代码不需要改
............
url=""&neirong
num = Cint(request.QueryString("pNum"))
session("liebie")=request.Form("type") '翻页会丢失
session("difang")=request.Form("difang") '翻页会丢失
改成如下
<%
dim url,neirong,liebie
url=""&neirong
num = Cint(request.QueryString("pNum"))
if request.Form("type")<>"" then
session("liebie")=request.Form("type")
session("difang")=request.Form("difang")
session("neirong")=request.Form("neirong")
end if
if (session("difang"))=1 then
response.Redirect(url)
else if (session("difang"))=2 then
if session("liebie")="" then
session("liebie")=request.Form("type")
end if
if (request.QueryString("pNum"))<>100000000000000 then
sql = "select * from "&session("liebie")&" where neirong like '%"&session("neirong")&"%' order by date desc"
Set rs=server.createobject("adodb.recordset")
rs.Open sql, conn, 1, 3
if rs.Eof and rs.Bof then
Response.Write("没有数据!")
Response.end
end if
pSize = 2
%>
下面的代码不需要改
............
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询