Over Write Value in Session State?

L

Leon

Can you write over a value in session or do you have to delete the value
first then re-create it?

**Example:
I have the following value in session state...
Statement 1 -- Session.Add("Email", "someone@ someplace.com ")

And I want to change it to the following value...
Statement 2 -- Session.Add("Email", "someone@ msn.com ")

Do I just execute statement 2 or do I have to delete statement 1 first?
 
O

Ollie

yes you can overwrite a value in session

you can even do:

Session["Email"] = "(e-mail address removed)";

HTH

Ollie Riches
 
L

Leon

Thanks!
Ollie said:
yes you can overwrite a value in session

you can even do:

Session["Email"] = "(e-mail address removed)";

HTH

Ollie Riches

Leon said:
Can you write over a value in session or do you have to delete the value
first then re-create it?

**Example:
I have the following value in session state...
Statement 1 -- Session.Add("Email", "someone@ someplace.com ")

And I want to change it to the following value...
Statement 2 -- Session.Add("Email", "someone@ msn.com ")

Do I just execute statement 2 or do I have to delete statement 1 first?
 

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

Top