Re: Multiple controls with the same ID '_ctl11'
From: Alessandro Zifiglio (alessandrozifiglio_at_No-Spam--hotmail.com)
Date: 03/18/04
- Next message: Teemu Keiski: "Re: Editing collection property from Property Window..."
- Previous message: Alessandro Zifiglio: "Re: CreateChildControls(...) or Render(...)?"
- In reply to: S. Reddi: "Multiple controls with the same ID '_ctl11'"
- Next in thread: S. Reddi: "Re: Multiple controls with the same ID '_ctl11'"
- Reply: S. Reddi: "Re: Multiple controls with the same ID '_ctl11'"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 18 Mar 2004 09:24:45 +0100
hi Reddi, I'm not clear with your problem. Even though you have tried to
elaborate on what is going on, the info you have provided is very scarce and
makes it very difficult to provide you with any help. I can only tell you
that the error is thrown because as the error states you have more than one
control on your page, that has the same ID on it. To verify this, go in the
"view source" of your page as it renders in IE and check the ID attributes,
you will notice this. The reason why this error is throw only after postback
is because asp.net tries to reference you control as it postsback but
because of the multiple ID issue, is having problems. Recheck your code,
execute it in debug mode, run it line by line, see what happens, check to
see where you are supplying the same ID --or how you are supplying the ID
for your dynamic controls.
Thats about all the help I can give you right now ;P
"S. Reddi" <sreddi@razorhost.com> wrote in message
news:18e2f04c.0403171215.3bb14797@posting.google.com...
> We designed a dynamic control loading framework that loads ASCX files
> into placeholders in a single ASPX page that inherits from a base page
> class. The framework consists of a controller device that is dragged
> out onto the ASPX page and "devices" that are dragged out onto the
> ASCX files. At run time for the first time through, the controller
> fires (Init) before the page loads and it loads all of ASCX files into
> an arraylist using loadcontrol. It then loads the default ASCXs by
> iterating through a list of the default "devices" to load and adds the
> ascx controls to the appropriate placeholder that are a parent to the
> device. Overall everything works fine, however the above message is
> generated for a given ASCX for a given load sequence. In other words,
> most of the ASCXs load into their respective placeholders as expected,
> however one ascx seems to cause this error to generate based on when
> it is loaded. So far I have not been able to determine what
> conditions need to exist before the error is generated.
>
> I do know that the ascx in question will load successfully the first
> time it is loaded. Also, the error will appear only after the ascx is
> loaded again and a form action is taken (button click). The framework
> generates the error immediately so none of the implementation code
> actually fires (global.asax has an error handler).
>
> Both the device and devicecontroller inherit from an abstract base
> class (and implement INamingContainer) and fire custom loaded events
> to each other as needed. The page also inherits from a base page
> class that wraps System.Web.UI.Page.
>
> Obviously, this is not much to go on and the code is fairly extensive
> to share, so I am looking for some suggestions or anything?
>
> Thanks for your time.
- Next message: Teemu Keiski: "Re: Editing collection property from Property Window..."
- Previous message: Alessandro Zifiglio: "Re: CreateChildControls(...) or Render(...)?"
- In reply to: S. Reddi: "Multiple controls with the same ID '_ctl11'"
- Next in thread: S. Reddi: "Re: Multiple controls with the same ID '_ctl11'"
- Reply: S. Reddi: "Re: Multiple controls with the same ID '_ctl11'"
- Messages sorted by: [ date ] [ thread ]