Unique IDs not yielded by INamingContainer

I have a user control named tabletuc

Partial Class tabletuc
Inherits System.Web.UI.UserControl
Implements System.Web.UI.INamingContainer
End Class

It is referred to as so:

DEFAULT (main page) HTML

<!-- Tablet_1 -->
<div id="1" class="tablet" style="background-image: url(images/
backgrounds/darkgrey.png)">
<uc1:tabletuc ID="tabletuc1" runat="server" />
</div>

<!-- Tablet_2 -->
<div id="2" class="tablet" style="background-image: url(images/
backgrounds/darkgrey.png)">
<uc1:tabletuc ID="tabletuc2" runat="server" />
</div>

As you can see from the web user control definition above, I have
implemented INamingContainer
in the user control (and I have tried putting this code in the default
aspx page too (and instead)) yet
I get matching ids for unique usercontrols' child controls as shown
below-

GENERATED SOURCE CODE

<!-- Tablet_1 -->
<div id="1"....
<input id="Text1" ....
<img id="Img1" ....

<!-- Tablet_2 -->
<div id="2"....
<input id="Text1" ....
<img id="Img1" ....

(the input and img child controls have the same id).
Within the page I would like every control to have a unique ID,
not just unique within a div or user control.

What am I doing wrong? How can I fix it?
DanWeaver [ Mo, 07 April 2008 20:31 ] [ ID #1937005 ]
Microsoft » microsoft.public.dotnet.framework.aspnet » Unique IDs not yielded by INamingContainer

Vorheriges Thema: ASPNET 2003 to 2005
Nächstes Thema: FormView update problem