Quick question

  • Thread starter Thread starter PokerMan
  • Start date Start date
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.
 
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;

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