Indeed!
i just tested two control instances and they remain having unique values.
The example in the help is ok:
public String Text
{
get
{
object o = ViewState["text"];
return (o == null)? String.Empty : (string)o;
}
set
{
ViewState["Text"] = value;
}
}
"Martin Gregersen" <gr*******@webshine.dkschreef in bericht
news:eX**************@TK2MSFTNGP03.phx.gbl...
Maybe if you use the "this" (C#) or "me" (vb) keyword? Then I would asume
that it would behave(?)...
Martin Gregersen
WebShine A/S
gr*******@webshine.dk
"Edwin Knoppert" <ne**@hellobasic.comwrote in message
news:45***********************@text.nova.planet.nl ...
I read that i should use the viewstate to store properties for a
usercontrol.
But what will happen when i have 2 or more instances of this usercontrol on
the same webpage?
Is the ViewState able to make unique instances for me, i don't think so..
I'm looking for the "how it should" way..