Asp session 问题!在线等!

来源:百度知道 编辑:UC知道 时间:2024/06/03 14:14:42
如果没有登陆,就不能进入内部页面
比如:logon.asp 登陆页
index.asp
没登陆,就在地址栏中输index.asp的路径 会出现"你还没登陆"

index.asp

<%
if session("isLogon")="" then
response.write"你还没登陆"
response.end
end if
%>

logon.asp
这里必须根据你自己的东西来写了。
判断的代码大概如下:
if (查询数据库知道密码正确) then
session("isLogon")="yes"
else
session("isLogon")=""
end if

用session喽,还可以用response.Cookies