Home All Groups Group Topic Archive Search About

Multiple controls with the same ID

Author
14 Nov 2008 2:42 AM
JojoStonehead
I'm getting the following error:
......................
Multiple controls with the same ID '_1' were found. FindControl requires
that controls have unique IDs.
.....................

I get this on a postback of a page with user control which has some custom
controls on it.

I'm working in ASP.NET 1.1 (VS 2003)
Any suggestions will be appriciated

G.

Author
14 Nov 2008 1:46 PM
George Leithead
On Nov 14, 2:42 am, JojoStonehead
<JojoStoneh***@discussions.microsoft.com> wrote:
> I'm getting the following error:
> .....................
> Multiple controls with the same ID '_1' were found. FindControl requires
> that controls have unique IDs.
> ....................
>
> I get this on a postback of a page with user control which has some custom
> controls on it.
>
> I'm working in ASP.NET 1.1 (VS 2003)
> Any suggestions will be appriciated
>
> G.

When creating the child-controls of the custom control, you need to
add them with unique IDs.  So, simply assign an ID!