D
Dan
I'm trying to replace my panels with usercontrols. On
pageload, I pull an array and it's index from the session
and I load a corresponding usercontrol and add it to a
placeholder. This control dynamically gets webcontrols
added to it. When user clicks next, I remove the control,
get the next control in the array and add it to the
placeholder. This works good. When user clicks back, I
remove the current control, get the previous control and
load it. During the pageload of this control i try to
dynamically add webcontrols again and I get this error.
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.
I've also tried to set the existing control to invisible
instead of removing it, but I still get this error.
Help
pageload, I pull an array and it's index from the session
and I load a corresponding usercontrol and add it to a
placeholder. This control dynamically gets webcontrols
added to it. When user clicks next, I remove the control,
get the next control in the array and add it to the
placeholder. This works good. When user clicks back, I
remove the current control, get the previous control and
load it. During the pageload of this control i try to
dynamically add webcontrols again and I get this error.
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.
I've also tried to set the existing control to invisible
instead of removing it, but I still get this error.
Help