473,320 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Session Variables Not Being Saved Between Page Redirects

Im having problems maintaining session state.

I set a session variable like this:

Session("NavigatedAway") = "Yes"

Then when I redirect to another page and try to look at the session
variable, it's set to Nothing.

Any clues?

I have EnableSessionState on my page directives..and cookies are on.

The reason I need to do this that I need to maintain the current state
of my webform when I navigate away from it so that it will have all the
same settings when I navigate back to it.

Nov 19 '05 #1
2 5213

"Hanover" <da*******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Im having problems maintaining session state.

I set a session variable like this:

Session("NavigatedAway") = "Yes"

Then when I redirect to another page and try to look at the session
variable, it's set to Nothing.

Any clues?

I have EnableSessionState on my page directives..and cookies are on.

The reason I need to do this that I need to maintain the current state
of my webform when I navigate away from it so that it will have all the
same settings when I navigate back to it.


What method/event are you placing the code in to store the var?

Mythran

Nov 19 '05 #2
Check out:
http://weblogs.asp.net/bleroy/archiv...03/207486.aspx

Someone asked the same question earlier :)

If you just want to preserve data from 1 page to the other, you could always
store it in Context.Item and use Server.Transfer

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Hanover" <da*******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Im having problems maintaining session state.

I set a session variable like this:

Session("NavigatedAway") = "Yes"

Then when I redirect to another page and try to look at the session
variable, it's set to Nothing.

Any clues?

I have EnableSessionState on my page directives..and cookies are on.

The reason I need to do this that I need to maintain the current state
of my webform when I navigate away from it so that it will have all the
same settings when I navigate back to it.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
3
by: M Wells | last post by:
Hi All, Just wondering how you go about changing the value of a session cookie via javascript? I have a PHP page that sets a session cookie when it first loads. I'd like to be able to change...
14
by: Michael Carr | last post by:
I have an intermittent problem that occurs on a very small number of browsers that access my website. The strange thing is this: my site works perfectly for 99.9% of browsers. The behavior...
14
by: Coleen | last post by:
Hi All :-) We have an APSX application using VB.net as the code behind, which uses one or two session variables per page. These Session variables are passed to the final page and calculations...
1
by: Tom | last post by:
I've been researching this for a while now -- perhaps someone here knows the explanation. I uploaded to my remote host (system info: PHP Version 4.3.11, FreeBSD metis.cleverdot.com...
0
by: Mike Lee | last post by:
Hey All, Using C# with ASP.NET 1.1 and I've noticed an issue on my system running pages that save data to the session object. I've got a login page that after you login and are verified it will...
2
by: Ned Balzer | last post by:
Hi, Apologies if this is a newbie question, I haven't found the answer in any faqs. I have an asp.net 2.0 page that sets session variables and then redirects to another page. For the page...
22
by: K. A. | last post by:
I have two servers at work, 'A' for testing and development, and server 'B' for production. On server A, I wrote a PHP test code to login users then direct them to a personalized page. This is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.