Click to See Complete Forum and Search --> : Strange Error !!!


NinaWilliam
03-16-2006, 05:07 AM
Strange Error !!!

Help please.. i was testing my application today and i get this error message for the first time
and i don't know what i did wrong.. or what causing it.. i didn't get this error before
only today..the error is :

Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

please help me..it is driving me crazy.. because i tried to track it down using breakpoints but it didn't work

Regards,

Nina

Hack
03-17-2006, 11:42 AM
Have you moved any controls around?

You have to have the same controls added to the placeholder each time. Bascially it has to do with how the framework restores Viewstate.

You can always disable ViewState (EnableViewState=false). That should fix it but then you can't use Viewstate on those controls.

NinaWilliam
03-17-2006, 04:24 PM
thank you hack :)