Hello,
I want to set a unique id for each item in a repeater like this:
<asp:repeater id=__theTabStrip runat="server" DataSource='<%#
DataBinder.Eval(Container,"TabText") %>'>
<ItemTemplate>
<asp:Button Runat="server" id="<%# Container.DataItem %>" BackColor="<%#
SetTabBackColor(Container) %>" />
</ItemTemplate>
</asp:repeater>
However, the id="<%# Container.DataItem %>" generates an error:'<%#
Container.DataItem %>' is not a valid identifier.
Would someone please tell me what I did wrong?
Many Thanks

Signature
help, help
Cowboy (Gregory A. Beamer) - MVP - 14 Jul 2005 16:51 GMT
My two cents: It is easier to set up a container and bind multiple dynamic
controls to it than it is to attempt to declaratively bind dynamic controls
to a control (like a repeater).

Signature
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
> Hello,
> I want to set a unique id for each item in a repeater like this:
[quoted text clipped - 13 lines]
>
> Many Thanks