Home > Archive > ASP > July 2004 > simple link question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
simple link question
|
|
|
| Please don't look down on me for this, but it is something I have never
thought learning before.
Lets say you have protected pages.. and youhave script at the top that
directs the user to the login page if they are not logged on.
how can i have someone log in, and once they click the login button, they
get directed to the page they were trying to view in the first place?
For example, a user wants to view the standings.asp page.... but they are
not logged in, so the server directs them to the login page. after putting
the username and pw.. they click the login button, and i want them to go to
the standings.asp page.
if it was only this page, that would be easy.. but say there is 20 protected
pages on the site. i am thinking this has something to do with passing
variables to an asp page, but i am not sure.
Jeff
| |
|
|
in the page they try to view create a session variable ("target")
session("target")="standings.asp"
in the login pages Response.Redirect session("target")
| |
| Bã§TãRÐ 2004-07-29, 3:55 am |
| They way that I have seen this done (using another scripting language) was using a combination of querystrings, case statements and sessions. I'll explain the basics of the functionaliy so it will
help you start in a in a direction.
Basically the default page held nothing but a huge set of case statements (holding variable names) and include files.
On the page there was a variable declared which held the variable name and that was appended to the querystring.
When the session timed out - it was redirected to the login page and the login page redirected to the referer page automatically upon login
Home this helps a little
- Bastard
On Wed, 28 Jul 2004 19:21:07 -0400, "Jeff" <gig_bam_takemeout_@verizon.net> wrote:
>Please don't look down on me for this, but it is something I have never
>thought learning before.
>
>Lets say you have protected pages.. and youhave script at the top that
>directs the user to the login page if they are not logged on.
>how can i have someone log in, and once they click the login button, they
>get directed to the page they were trying to view in the first place?
>For example, a user wants to view the standings.asp page.... but they are
>not logged in, so the server directs them to the login page. after putting
>the username and pw.. they click the login button, and i want them to go to
>the standings.asp page.
>
>if it was only this page, that would be easy.. but say there is 20 protected
>pages on the site. i am thinking this has something to do with passing
>variables to an asp page, but i am not sure.
>Jeff
>
|
|
|
|
|