simple link question

J

Jeff

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
 
J

John

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

Bã§TãRÐ

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top