473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Viewstate error when adding user controls

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.
Jun 9 '07 #1
2 1929
On Jun 9, 1:35 pm, "Chris" <nos...@nospam.comwrote:
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/micro...d+viewstate%22

Jun 9 '07 #2
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.

"Alexey Smirnov" <al************@gmail.comwrote in message
news:11**********************@p77g2000hsh.googlegr oups.com...
On Jun 9, 1:35 pm, "Chris" <nos...@nospam.comwrote:
>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/micro...d+viewstate%22

Jun 9 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: theo | last post by:
Hi... I wish to extract the text content of an Xml file and assign it to DropDownList controls at runtime.I can get the Xml file text content into the DropDownList controls (Ex...if 5 Xml text...
9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
1
by: Tim | last post by:
Greetings! I have a UserControl. On this UserControl is a Panel and a RadioButtonList. The Panel's Visible property is set to false by default. When the user selects a particular...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.