programmatically adding controls and ViewState
"Smotritsky, Alex" <[email protected]> Fri, 6 Jul 2007 14:38:50 -0600
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <[email protected]> |
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