redirect statement

now i want instead to create a page with this code    if fails go back to login but if it suceeds then i would like to go to index.asp

<%@LANGUAGE="VBSCRIPT"%>
<%

Session("username") = Request.Form("txt_username")

If Session("username") <> "Cadillac" Then
Response.Redirect("login.asp")
else
Response.Redirect("index.asp")
end if
%>
LVL 1
gianitooAsked:
Who is Participating?
 
hongjunCommented:
But then on your other pages, you shld have something like this at the top

<%
If Session("username") = "" then Response.Redirect "login.asp"
%>
0
 
hongjunCommented:
Your code looks ok..
0
 
gianitooAuthor Commented:
but it goes back to login.asp
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
ThinkPaperIT ConsultantCommented:
.. what's your question??? @_@
0
 
hongjunCommented:
What page are you in now?
Your login page or other pages?
0
 
hongjunCommented:
In your other pages (not your login page check), you SHOULD NOT have the check with Request.Form because they will not exist
0
 
hongjunCommented:
Is your question answered?
Sure?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.