473,888 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BUG? Multiple controls with the same ID

Hi Guys

I've got an ASP.NET application that dynamically creates a navigation table
from an XML file and then Loads a user control according to which link has
been selected. The control overrides the pages functionality using
'TemplateContro l.LoadControl' to dynamically load a UserControl (.ascx)
that implements HttpContext.Cur rent.Cache functionality. The application
works fine in our development environment but when deployed live the
following error is randomly generated:

ERROR = System.Web.Http Exception: Multiple controls with the same ID
'tr_xxx' were found. FindControl requires that controls have unique IDs. at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at

I havn't included any code snippets as the application works fine and this
is a totally random error which occurs infrequently. The application is
hosted on a W2K Server and is built in the 1.0 Framework. I read the
following article by Microsoft, but installing this patch knocked out the
application.

http://support.microsoft.com/default...b;EN-US;834608

I'm in a quandary with this one, any pointers would be most appreciated.

Thanks in advance....

Bal


Nov 18 '05 #1
2 4454
On Mon, 12 Jul 2004 13:53:12 +0100, Bal Ghuman <ba********@lov ells.com>
wrote:
Hi Guys

I've got an ASP.NET application that dynamically creates a navigation
table
from an XML file and then Loads a user control according to which link
has
been selected. The control overrides the pages functionality using
'TemplateContro l.LoadControl' to dynamically load a UserControl (.ascx)
that implements HttpContext.Cur rent.Cache functionality. The application
works fine in our development environment but when deployed live the
following error is randomly generated:

ERROR = System.Web.Http Exception: Multiple controls with the same ID
'tr_xxx' were found. FindControl requires that controls have unique IDs.
at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at

I havn't included any code snippets as the application works fine and
this
is a totally random error which occurs infrequently. The application is
hosted on a W2K Server and is built in the 1.0 Framework. I read the
following article by Microsoft, but installing this patch knocked out the
application.

http://support.microsoft.com/default...b;EN-US;834608

I'm in a quandary with this one, any pointers would be most appreciated.

Thanks in advance....

Bal



Looks like that fix is for framework 1.1, may not work for 1.0.

Here's a post w/ more details on apparently what's happening:
http://www.dotnet247.com/247referenc.../12/61031.aspx

and some more insigth:
http://www.dotnet247.com/247referenc...52/260219.aspx

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #2
Thanks for the pointers, because the error is so random its almost
impossible to nail down. Over the past few weeks I've tried a few options,
including rebuilding the application in the 1.1 Framework. But the patch
Microsoft released is problematic and they are due to include a revised
version in their next Service Pack.

"Craig Deelsnyder" <cdeelsny@no_sp am_4_meyahoo.co m> wrote in message
news:op******** ******@web-1161d.webservic es.nrt...
On Mon, 12 Jul 2004 13:53:12 +0100, Bal Ghuman <ba********@lov ells.com>
wrote:
Hi Guys

I've got an ASP.NET application that dynamically creates a navigation
table
from an XML file and then Loads a user control according to which link
has
been selected. The control overrides the pages functionality using
'TemplateContro l.LoadControl' to dynamically load a UserControl (.ascx)
that implements HttpContext.Cur rent.Cache functionality. The application works fine in our development environment but when deployed live the
following error is randomly generated:

ERROR = System.Web.Http Exception: Multiple controls with the same ID
'tr_xxx' were found. FindControl requires that controls have unique IDs.
at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at
System.Web.UI.C ontrol.FillName dControlsTable( Control namingContainer ,
ControlCollecti on controls) at

I havn't included any code snippets as the application works fine and
this
is a totally random error which occurs infrequently. The application is
hosted on a W2K Server and is built in the 1.0 Framework. I read the
following article by Microsoft, but installing this patch knocked out the application.

http://support.microsoft.com/default...b;EN-US;834608

I'm in a quandary with this one, any pointers would be most appreciated.

Thanks in advance....

Bal



Looks like that fix is for framework 1.1, may not work for 1.0.

Here's a post w/ more details on apparently what's happening:
http://www.dotnet247.com/247referenc.../12/61031.aspx

and some more insigth:
http://www.dotnet247.com/247referenc...52/260219.aspx

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 18 '05 #3

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

Similar topics

8
2217
by: Gaetan | last post by:
hi i have 2 classes A1 and A2 implementing a problem with 2 different ways i also have 2 other classes X1 and X2 implementing an other problem i need classes that provide A1+X1 methods, A1+X2, A2+X1 and A2+X2: interface A class A1 implements A
3
2795
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I reference these pages/ controls from my ASP.NET web projects WEbApp1 url http://localhost/app1 C:\Apps\App1
1
1927
by: Novice | last post by:
Hey all, I have finally managed to create a Custom WebControl and am using a technique from another programmer to maintain state between pages - I would just like to validate this idea. Basically I have created a Custom Web Control that is capable of generating multiple webpages. It actually only creates one webpage, but hides Panels (that contain the web controls - TextBox's, Labels, etc) to give the impression that the user is...
0
1416
by: PB | last post by:
According to the documentation, ParseControl returns a parsed control from an input string. The documentation seems to assume that *one* control will be parsed from the string. My implementation will require an unknown number of controls (always at least one) to be parsed from the string... after which I inject the resulting HTML into a PlaceHolder control (see code below). In my testing, it appears that ParseControl will successfully...
3
2799
by: Nathan Sokalski | last post by:
When I view any page in my application a second time, I recieve the following error: System.Web.TraceContext.AddNewControl(String id, String parentId, String type, Int32 viewStateSize) +313 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +201 System.Web.UI.Control.BuildProfileTree(String parentId, Boolean calcViewState) +263
11
3159
by: Ranginald | last post by:
This question is about how to handle an .aspx page that references multiple methods and where to store these methods (e.g. one codefile or multiple codefiles). PREFACE ======== I have a simple category/product asp.net/C# web site I am coding in web dev express and laying out in dreamweaver MX. I find the layout tools in web express difficult to use and implementation of complex templates much easier in dwmx.
9
3209
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will load with different data (locations, departments, etc.).
0
1193
by: KR | last post by:
I finally got back to this. The syntax that worked for me was: For Each ctlarray As Control.ControlCollection _ In New Control.ControlCollection() _ { Form1.Controls _ , Form1.tabPage1.Controls _ , Form2.TabPage2.Controls _ } For Each ctl As Control _ In ctlarray
2
5041
by: englishman69 | last post by:
Hello, I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation is this, I have a page which uses multiple postbacks to generate a list of dynamic text boxes with appropriate labels. However, when I do the final postback to enter the values in the dynamic textboxes into the database the values seem to become...
3
1928
by: =?Utf-8?B?a3dvbmd0aw==?= | last post by:
error message found in server A "Multiple controls with the same ID 'batchEndorseworklist' were found. Trace requires that controls have unique IDs." but in server B is normal why? thank you
0
9800
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
11180
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
10778
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...
1
10885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10439
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9597
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...
1
7990
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4244
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.