emperezg
Posts: 8
|
| Posted: 03/29/2007, 2:20 PM |
|
Hi,
I'd like to have a login page that after a successful logon (valid username & password) redirects the user to a default.asp page.
How can I get this done?
I've seen that a login page (e.g. login.asp) always redirects to the page a user tries to gain access after a successful login.
Please help.
_________________
helping others gives meaning to your life! |
 |
 |
amcfadyen
Posts: 8
|
| Posted: 04/07/2007, 7:10 AM |
|
Hi
How about using a session variable, and call a function in every page to determine whether the user has already visited the default page.
So:
Session("hasvisiteddefault")=0 (you could set this when the login.asp page is loaded).
When the user logs in, regardless of the page he has selected, call a function to check what the value of Session("hasvisiteddefault") is. If it is 0, response.redirect to to default.asp. If it is not 0, allow the user access to the requested page.
When default.asp is loaded, set the value of Session("hasvisteddefault") to 1. In that way the system knows the user has seen the default page and will allow access to whatever page he has requested as he navigates around.
Hopefully this will achieve the effect you're trying for.
Regards
Alistair
|
 |
 |
emperezg
Posts: 8
|
| Posted: 04/09/2007, 5:59 AM |
|
Thanks for your reply Alistair,
I will try as adviced. However, I believe there's a response.redirect command there in login page that I can modify to defaults to 'default.asp'.
I think of this because I studied the code on task manager app at http://www.gotocode.com/
and that code I could see a response.redirect 'default.asp' page, that's why I think there should be simple command to be changed.
All the best
Emmanuel
_________________
helping others gives meaning to your life! |
 |
 |
|