I have a Web User Control that holds many others User Controls. I'd like to name those embedded controls based on the ID of the parent user control.
I'm trying this code inside the main User Control:
<myLibrary:myChildUserControl1 ID="<%=ID%>" runat="server" />
or
<myLibrary:myChildUserControl2 ID="<%=ID%>_OkButton" runat="server" />
In both cases I get a compiler error.
Note that I have no problem assigning the control ID to regular HTML elements. The following code works well:
<div ID="<%=ID%>" >
What I am missing?