Multiple controls with the same ID, Failed to load viewstate

E

Eamonn O'Connell

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(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control namingContainer,
ControlCollection controls)
at System.Web.UI.Control.FillNamedControlsTable(Control 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(NameValueCollection 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(Object savedState)
at System.Web.UI.Control.LoadViewStateRecursive(Object 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.AddSingleControlRow()
at OC_WebControls.TocRepeatingSection.EnsureChildControls()
at OC_WebControls.TocRepeatingSection.TocRepeatingSection_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()
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top