Over Write Value in Session State?

  • Thread starter Thread starter Leon
  • Start date Start date
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?
 
yes you can overwrite a value in session

you can even do:

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

HTH

Ollie Riches
 
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?
 
Back
Top