Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Multiple controls with the same ID, Failed to load viewstate

Reply
Thread Tools

Multiple controls with the same ID, Failed to load viewstate

 
 
Eamonn O'Connell
Guest
Posts: n/a
 
      07-17-2007
Hi,

I am load-testing a VB.NET 1.1 web app and have encountered the following
two errors:

1) Multiple controls with the same ID 'CheckBox1' were found. FindControl
requires that controls have unique IDs.

2) 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.

These errors appear to happen randomly, around 2% of the time i.e. normally
the page works fine, then randomly oneof the above errors will happen. These
errors do not happen if a low number of users are using the site. The errors
happen on a page where we dynamically add controls. The controls are
dynamically created during the Page_Init event.

(The server is Windows Server 2003 - Web Edition - Service Pack 2. I know
that the 'Multiple controls' error can happen in an earlier release of .NET
framework 1.1, however the above service pack means this should not be the
cause of the error we are getting.)

Has anyone else see these errors happen like this before?
The full text of the messages are presented below.

Many thanks,
Eamonn O'Connell
-------------------------------------------------------------------------------
Multiple controls with the same ID 'CheckBox1' were found. FindControl
requires that controls have unique IDs.

at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Contr ol namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FindControl(String id, Int32 pathOffset)
at System.Web.UI.Control.FindControl(String id)
at System.Web.UI.Page.ProcessPostData(NameValueCollec tion postData,
Boolean fBeforeLoad)
at System.Web.UI.Page.ProcessRequestMain()
-------------------------------------------------------------------------------
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.

at System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
at System.Web.UI.Control.LoadViewStateRecursive(Objec t savedState)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at OC_WebControls.TocControlContainer.CreateControls( ResourceManager
resourceManager, WebControlFactory controlFactory, DataRow[] controlRows,
Hashtable parentControls, Int32 parentWidth)
at OC_WebControls.TocRepeatingSection.AddSingleContro lRow()
at OC_WebControls.TocRepeatingSection.EnsureChildCont rols()
at OC_WebControls.TocRepeatingSection.TocRepeatingSec tion_Load(Object
sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Errors: Failed to load viewstate. & Validation of viewstate MAC failed. sck10 ASP .Net 6 09-01-2006 05:59 PM
Failed to load viewstate. The control tree into which viewstate... Josema ASP .Net Building Controls 2 05-22-2005 10:38 AM
Failed to load viewstate. The control tree into which viewstate... Josema ASP .Net Web Controls 0 05-09-2005 10:58 AM
Failed to load viewstate when dynamically adding controls in placeholders Sinisa Ruzin ASP .Net 0 10-07-2004 05:31 PM
Repeater failed to load the viewstate when Controls.Count was called in OnInit Invalidlastname ASP .Net 7 01-16-2004 06:05 AM



Advertisments