How to use session variables?

M

Me

I am unable to pass the values using session variables.
Here is what I tried thus far -

1. In the 1st program I have created a session variable called name
Session.Name= <the value I would like to pass>

2. In the next program how do I use it?

I tried a few things but it doesn't work.

Thanks for your help in advance.

-Me
 
C

CJM

Me said:
1. In the 1st program I have created a session variable called name
Session.Name= <the value I would like to pass>

Session("Name") = "My Name"
2. In the next program how do I use it?

Response.Write "My Name is " & Session("Name")
I tried a few things but it doesn't work.

You might want to try a few more. Session variables aren't the best way to
pass variables from page to page - they can quickly suck up your servers
resources, even in a very modest application.. You could use querystrings,
forms or storing your session state in a database.
Thanks for your help in advance.

Not probs.

CJM
 
M

Me

CJM,

Thanks for the reply!
Where can I find the doc on creating and using session variables?
In our case resources isn't an issue (at least now).

Thank you,
-Me
 

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,139
Messages
2,570,805
Members
47,356
Latest member
Tommyhotly

Latest Threads

Top