INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Session Variable is Null

Session Variable is Null

(OP)
I am using the following code in the header of the pages on a web site: Session("backPage") = curPageURL()
I want to capture the URL of the page the user is looking at.
Then when they click on a link on the header, it transfers them to another page. When they are finished with the page, I want to transfer them back to the prior page the user was looking at.
When I do a Response.Write "backPage=" & Session("backPage") in the header, the actual URL is displayed. However when I do a Response.Write "backPage=" & Session("backPage") on the linked to page, I get a null value. What am I missing?
Regards, Richard

RE: Session Variable is Null

No idea, are you reinitialising the session variables on loading the next URL?

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum

RE: Session Variable is Null

It looks like you are trying to assign a client side (javascript) value to a server side session variable which as I understand is never going to work.

The way I got round to this was to write a little AJAX function to POST the current URL off to my ASP code which would write it to a database (or in your case assign it to a session variable).

If you want more help along these lines let me know.

Thanks

Ed

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close