Smotritsky, Alex
2007-07-06 20:38:50 UTC
This Microsoft page:
http://msdn2.microsoft.com/en-us/library/hbdfdyh7(VS.80).aspx
says:
If you insert dynamic controls between existing controls, the dynamic
control's view state information is inserted into the corresponding
location of the view state structure. When the page is posted and the
view state is loaded, the dynamic control does not yet exist; therefore,
the extra information in view state does not correspond to the right
control. The result is usually an error indicating an invalid cast.
A control I'm dynamically inserting is disappearing on postback. I think
that's because of the above mentioned issue. Is there a solution to
this?
===================================
This list is hosted by DevelopMentor� http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com
http://msdn2.microsoft.com/en-us/library/hbdfdyh7(VS.80).aspx
says:
If you insert dynamic controls between existing controls, the dynamic
control's view state information is inserted into the corresponding
location of the view state structure. When the page is posted and the
view state is loaded, the dynamic control does not yet exist; therefore,
the extra information in view state does not correspond to the right
control. The result is usually an error indicating an invalid cast.
A control I'm dynamically inserting is disappearing on postback. I think
that's because of the above mentioned issue. Is there a solution to
this?
===================================
This list is hosted by DevelopMentor� http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com