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).
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
[quoted text, click to view] "rouqiu" wrote:
> 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
>
>
>
> --