Will ViewState variable with same name set in different controls overwrite same value?
Posted on 2009-05-10
Can anyone tell me whether ViewState["MyValue"] will refer to the same ViewState item if I set it in different control classes i.e. lets say I have 2 user controls, Control1 and Control2 and Control1 sets this ViewState value and then Control2 also sets the same ViewState variable name are they both referencing the same item or does .NET prefix the name with the control that created it a bit like the control ClientID?
The same goes for Session variables, will different controls using the same variable name be overwriting the same value?