Viewstate error when adding user controls

C

Chris

I am getting a viewstate error when adding dynamically user controls.

SYSTEM_EXCEPTION: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.

My understanding is that the information about the controls getting posted
back has to match the controls being created. When they don't match, this is
what creates the error. The main solution I have seen is to add all the user
controls and use visability to swap bewteen them. My page could have 14 user
controls. Will this add a massive performance hit to the page? Are there any
alternative approaches. Regards, Chris.
 
G

Guest

I am getting a viewstate error when adding dynamically user controls.

SYSTEM_EXCEPTION: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.

My understanding is that the information about the controls getting posted
back has to match the controls being created. When they don't match, this is
what creates the error. The main solution I have seen is to add all the user
controls and use visability to swap bewteen them. My page could have 14 user
controls. Will this add a massive performance hit to the page? Are there any
alternative approaches. Regards, Chris.

http://groups.google.com/group/micr...framework.aspnet&q="Failed+to+load+viewstate"
 
C

Chris

I've tried adding explicit id's and I don't want to turn the viewstate off.
I kind of understand sort of why it is happening was just wonder whether
there was a straight forward and efficient solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top