yes, by design.
if you use inproc sessions (the default), you a storing a reference to
control in session. if you make changes to the control, the changes are
reflected in session because its the same object. this is different than
value types.
string a = "hello";
string b = a; // b = "hello";
a = "bye"; // b still = "hello" because a now points to a new string
now lets look at objects
class test {
public string value = "hello";
}
test a = new test();
test b = a;
a.value = "bye"; // b.value = "bye", because a is not pointing to
a new object,
// a method was just called on the
common object
a = new test(); // make a point to new object
a.value = "more"; // b.value is still "bye", because a now points to
a new object
-- bruce (sqlwork.com)
"Alex D." <al********@hotmail.com> wrote in message
news:ur**************@TK2MSFTNGP12.phx.gbl...
Hi. I have a TreeView stored in a session variable...is ok...problem is
when I use Nodes.Clear() then my session variable that holds the TreeView
is also emptied! Is this behavior by design or it's some kind of bug??
Thanks,
Alex.