Quick question

P

PokerMan

Hi

In a session key add such as:

Session.Add("CustId", userId);

if i then called that again so say i did this



Session.Add("CustId", userId);

Session.Add("CustId", userId);



Would it overwrite the first one with the valaue of the second one, or does
it somehow add the session variable twice? If it does add it twice how do i
make it overwrite the old one if the old one doesnt exist already and if it
does. Thanks.
 
T

Thomas Hansen

Hi

In a session key add such as:

Session.Add("CustId", userId);

Also this syntax in in general terms slightly more sexy:
Session["x"] = someVariable;

....
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

Yes, in this case it would overwrite the previous value.
 

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,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top