F
Flare
(ASP.NET 1.1)
Hi
I have a problem with my ViewStates in a userControl. The problem is that
the ViewState is not "writte" og changed if you like after editing in my
case a textbox.
This is the code I use to add the User controll
Control Component1 = null;
Component1 = LoadControl("MyUC.ascx");
((MyUC)Component1).RapId = 0;
PlaceHolderForComponents.Controls.Add(Component1);
The UserControl contains some textboxes wich is viewstateenabled and
autopostbacks.
If i change the value in one of these textboxes in the UC and the above code
is placed in Page_Load every thing works fine, but if i place it in the
OnPreRender event all my change to my textboxes is discarded.
I simply Cant see why this should make the change disapear and i really hope
someone has a solution.
Best reagards
Anders, DK
Hi
I have a problem with my ViewStates in a userControl. The problem is that
the ViewState is not "writte" og changed if you like after editing in my
case a textbox.
This is the code I use to add the User controll
Control Component1 = null;
Component1 = LoadControl("MyUC.ascx");
((MyUC)Component1).RapId = 0;
PlaceHolderForComponents.Controls.Add(Component1);
The UserControl contains some textboxes wich is viewstateenabled and
autopostbacks.
If i change the value in one of these textboxes in the UC and the above code
is placed in Page_Load every thing works fine, but if i place it in the
OnPreRender event all my change to my textboxes is discarded.
I simply Cant see why this should make the change disapear and i really hope
someone has a solution.
Best reagards
Anders, DK