退出为什么不能清空(附代码)
检验登陆成功是返回原页面,为什么我点了退出,没有清空登录状态反而还是显示在登陆状态当中哪位大大能帮我看一下,是不是我的代码哪里写错了呢
、、
这是login.asp 登陆页面
<%
If Session("IsPassed") = true Then
%>
登陆成功! <% =Session("Name")%>,欢迎您的到来!
<div align="right"><a href="logout.asp">退出登陆</a></div>
<%else%>
<%
response.Write"<div align='left'> 用户名:<input name='Name'type='text'onblur='this.style.background='#FFF';' onfocus='this.style.background='#f4f4f4';' size='8' maxlength='16' width='50' value='"
%>
<%
'检查Cookies,如果存在帐号信息,则填写文本框
'If (Request.Cookies("Name") <> EMPTY) Then
'Response.Write(Request.Cookies("Name"))
'Else
'Response.Write("")
'End If
%>
<%
response.Write"' />"
response.Write" 密码:"
response.Write"<input name='passwd' type='password' onblur='this.style.background='#FFF';' onfocus='this.style.background='#f4f4f4';' size='8' maxlength='16' width='50' value='"
%>
<%
'检查Cookies,如果存在密码信息,则填写文本框
'If (Request.Cookies("Password") <> EMPTY ) Then
'Response.Write(Request.Cookies("Password"))
'Else
'Response.Write("")
'End If
%>
<%
response.Write"' /> "
response.Write" <input name='btnSub' type='button' class='STYLE1' style='BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid' value='登录' onclick='SubmitForm()'/>"
response.Write"<input name='button' type='button' class='STYLE1' style='BORDER-RIGHT: 1px solid; BORDER-TOP: 1px solid; BORDER-LEFT: 1px solid; BORDER-BOTTOM: 1px solid' value='注册' onclick='window.location.href='landing_1.asp'' />"
response.Write" </div>"
%>
<%end if%>
这是退出页面 logout.asp
<%
Session("Id") = ""
Session("Name") = ""
Session("IsPassed") = FALSE
Session("IsAdmin") = FALSE
Session("Class") = ""
Response.Cookies("Name") = ""
Response.Cookies("Password") = ""
'Response.Cookies("RemMe") = ""
Response.redirect(request.servervariables("http_referer"))
Response.End
%>