473,772 Members | 2,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

view state error


Hi,
Any one know the problem of the following error:
Thanks,
m
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.
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.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code.

Exception Details: System.Web.Http 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. 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.

Source Error:

An unhandled exception was generated during the execution
of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): 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.]
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +189
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.P age.LoadPageVie wState() +306
System.Web.UI.P age.ProcessRequ estMain() +423

Nov 18 '05 #1
1 15472
Is this a user control you created?
Please give me the specifics of what you are trying to do and how. The error
indicates an problem in the parent-child relationship in the control
hierarchy.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Michael" <an*******@disc ussions.microso ft.com> wrote in message
news:44******** *************** *****@phx.gbl.. .

Hi,
Any one know the problem of the following error:
Thanks,
m
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.
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.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code.

Exception Details: System.Web.Http 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. 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.

Source Error:

An unhandled exception was generated during the execution
of the current web request. Information regarding the
origin and location of the exception can be identified
using the exception stack trace below.

Stack Trace:
[HttpException (0x80004005): 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.]
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +189
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.C ontrol.LoadView StateRecursive( Object
savedState) +414
System.Web.UI.P age.LoadPageVie wState() +306
System.Web.UI.P age.ProcessRequ estMain() +423


Nov 18 '05 #2

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

Similar topics

1
1260
by: Tu-Thach | last post by:
Do you modify the page at all? Sometimes modifying the page causes the error you described. Alternatively, you do not have to use ViewState in your page. Tu-Thach >-----Original Message----- >hello All, > >we have a data entry web application written in asp.net,
4
1243
by: Michelle A. | last post by:
We are experiencing the invalid viewstate error on our pages. Considering the sheer number of people complaining of this problem, I hope a patch is on the way... SOON. Here are the details: Both server and clients are running Framework 1.1. We are in a single-server environment. We have tried the TemplateSourceDirectory fix, the machineCode fix, and the EnableViewStateMac="false" fix. We have restarted our server and our clients. ...
2
3219
by: Vinod I | last post by:
Hi Team, When I tryed following code, I am getting the Runtime Error as "The View State is invalid for this page and might be corrupted." Exception Details: System.Web.HttpException: The View State is invalid for this page and might be corrupted. Stack Trace: System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +150 System.Web.UI.Page.LoadPageViewState() +16
2
783
by: Brad | last post by:
I have an intranet app that has just started sporadically getting the following error "The viewstate is invalid for this page and might be corrupted." By sproadic I mean 3-4 times during the past two days out of 100's of hits. The error just started yesterday and this app has been running for quite some time without this error and has not been updated just before or after the error started. Reseaching this error I've checked the...
3
2125
by: Philip Tripp | last post by:
I've read numerous sources stating that view state can be disabled per control, and per page, but can't seem to keep web form controls from remembering their state on a postback. I'm using VS.Net 2002, .Net Framework 1.0 SP2. I create a new project, and add a new web form to the project. On the page properties, I set EnableViewState to False and verify that the @ Page directive has "enableViewState=false" in it. I then add a TextBox...
10
8822
by: Zack Sessions | last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command and ADO.NET? If so, is there a trick in trapping a SQL error when trying to create the view? I have a VB.NET app that, amoung other things, can create views based on existing tables and a table of column name equivalents. If I accidently introduce a column name equivalent that is the same as another column, I end up with a CREATE VIEW SQL statement that is in error, if...
20
2031
by: raptor | last post by:
hi, I want to make the following thing : select-based updatable VIEW, which have two more virtual-fields. One of them is concatenation of others and the second is calculated on the fly. Can I do this and if yes how? can u give some example? Here is the test bed : table1) id, date, field1, field2
104
10900
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through sorted by Numb. Everything I've read on the web suggests that including the TOP directive should enable ORDERY BY in views. Does someone have an idea why the sorting is not working correctly for this particular view? thanks. CREATE VIEW...
1
3733
by: ing42 | last post by:
I have a problem with inserting records into table when an indexed view is based on it. Table has text field (without it there is no problem, but I need it). Here is a sample code: USE test GO CREATE TABLE dbo.aTable ( INT NOT NULL
2
1635
by: Chris | last post by:
I am trying to create a view that creates a mailing list from two different tables. The t-sql code executes successfully but when I try to open the view I get this error message Error converting data type vchar to float. Here is the t-sql code I used to create the view: CREATE VIEW AS SELECT .. + ' ' + .. as Fullname, ..
0
9619
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10103
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8934
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.