ASP页面跳转问题
各位大侠帮我看看以下代码
我希望username为空,或者其属性status(类型为bit)不为true时自动跳转到index.htm页面
实际情况是username为空时能自动跳转,但status为空时却无法跳转,为何?
请多指点,谢谢!
username=HTMLEncode(Request.Cookies("username"))
if username=empty then
response.Redirect "index.htm"
else
sql="select status from user where username='"&username&"'"
Set Rs=Conn.Execute(SQL)
if not rs("status")=true then
response.Redirect "index.htm"
end if
end if