Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

redirect statement

Posted on 2006-04-27
7
Medium Priority
?
356 Views
Last Modified: 2012-08-13
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
%>
0
Comment
Question by:gianitoo
  • 5
7 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 16554974
Your code looks ok..
0
 
LVL 1

Author Comment

by:gianitoo
ID: 16554991
but it goes back to login.asp
0
 
LVL 33

Accepted Solution

by:
hongjun earned 2000 total points
ID: 16554993
But then on your other pages, you shld have something like this at the top

<%
If Session("username") = "" then Response.Redirect "login.asp"
%>
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 16

Expert Comment

by:ThinkPaper
ID: 16554994
.. what's your question??? @_@
0
 
LVL 33

Expert Comment

by:hongjun
ID: 16555000
What page are you in now?
Your login page or other pages?
0
 
LVL 33

Expert Comment

by:hongjun
ID: 16555013
In your other pages (not your login page check), you SHOULD NOT have the check with Request.Form because they will not exist
0
 
LVL 33

Expert Comment

by:hongjun
ID: 16555021
Is your question answered?
Sure?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question