一般情况下: 用户登录完成之后,系统(asp)使用session 或 cookie 来记录用户信息 如: session("username")="admin" 或 response cookies("username")="admin" 或者有特殊要求的话(在线统计之类)需要使用到 application对象来记录用户信息 如:application("username")=application("username")&"admin"&"," 根据你的描述,可以理解为两方面意思: 1.本地验证用户登录: 验证是否在本机已经登录过?request("user") if session("username")=request("user") then ‘或if request.cookies("username")=request("user") then '已经登录 else '未登录 end if 2.异地验证(一般在聊天室): 验证application("username")是否有request("user")即可。。。。。。
if 登陆成功 then session("user") = "你喜欢的值" //执行跳转 else //重新登陆 end if 跳转到的页进行判断 if session("user") <> "你喜欢的值" then //说明他没登陆 else //说明他登陆咯 end if