Session Variables in ASP.Net

G

Guest

Hi all

I've got a .Net site that has 3 session variables...the variables should persist over 23 unique insert pages, 23 update, and 23 "view total" pages...
And the problem is once I get past one page, the session vars disappear

The logic is
1. logon = set a session var to the email addres
2. redirect to a "main page" that uses the email sess var in a query to get the UserID in the database
This is successful because I have the user id sess var displayed on the page

now, if I do other stuff, like go to a different insert or update page and then navigate back to my main page, the session var is gone

and from the main page, there is an "update my info" that leads to a page that has a query that should be using the UserID session var, and I can see the session var on the page, but then when I go to the update page....it doesn't catch the session var in the query

I'm at wits end...I've been up 2 days (I know many of you know this feeling) help

==============
The session vars are set on the page load event just like the DMX tutorial says it should be..
Does a .Net form actually have to post back to itself to set the variable
Does it work to set the sess var on page load then do a response.redirect to another page? Shouldn't the variable still persist

HELP!!!!
 
S

Scott Allen

Does your browser accept cookies from the site?

Hi all,

I've got a .Net site that has 3 session variables...the variables should persist over 23 unique insert pages, 23 update, and 23 "view total" pages....
And the problem is once I get past one page, the session vars disappear.

The logic is:
1. logon = set a session var to the email address
2. redirect to a "main page" that uses the email sess var in a query to get the UserID in the database.
This is successful because I have the user id sess var displayed on the page.

now, if I do other stuff, like go to a different insert or update page and then navigate back to my main page, the session var is gone!

and from the main page, there is an "update my info" that leads to a page that has a query that should be using the UserID session var, and I can see the session var on the page, but then when I go to the update page....it doesn't catch the session var in the query!

I'm at wits end...I've been up 2 days (I know many of you know this feeling) help!

===============
The session vars are set on the page load event just like the DMX tutorial says it should be...
Does a .Net form actually have to post back to itself to set the variable?
Does it work to set the sess var on page load then do a response.redirect to another page? Shouldn't the variable still persist?

HELP!!!!
 

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

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top