J
John Cosmas
I've got a page which loads up a different user control into a placeholder
control every time a button is clicked on the parent page. I use a
statement like Me.plcTabViews.Controls.Add(LoadControl("test.ascx")). There
are up to 30 possibilities which are decided by CASE statements and keeps
one from loading up onto another. However, I'm running into a unique
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. 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.
This leads me to believe that in my code, I've not done something correctly.
It works fine loading up controls when I click or load several of the pages,
but it may fail after a few parent button/option clicks. Please advice!
TIA
John Cosmas
control every time a button is clicked on the parent page. I use a
statement like Me.plcTabViews.Controls.Add(LoadControl("test.ascx")). There
are up to 30 possibilities which are decided by CASE statements and keeps
one from loading up onto another. However, I'm running into a unique
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. 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.
This leads me to believe that in my code, I've not done something correctly.
It works fine loading up controls when I click or load several of the pages,
but it may fail after a few parent button/option clicks. Please advice!
TIA
John Cosmas