Although I appreciate your offer to help, I couldn't understand/implement either of the suggested solutions.
Since I couldn't get the datalist to work, I found an alternate approach to organize the display of dynamic controls into a page.
To keep it simple, I used a placeholder(ph1 ) in the html and I did this in the page_load code:
------------------------------------------------------
ph1.Controls.Ad d (New LiteralControl( "<table>"))
For each oItem in arrMyControlLis t
ph1.Controls.Ad d (New LiteralControl( "<tr><td>") )
ph1.Controls.Ad d( oItem.A)
ph1.Controls.Ad d (New LiteralControl( "</td><td>"))
ph1.Controls.Ad d( oItem.B )
ph1.Controls.Ad d (New LiteralControl( "</td></tr>"))
Next
ph1.Controls.Ad d (New LiteralControl( "</table>"))
-----------------------------------------------------
it works.
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message news:up******** ******@TK2MSFTN GP12.phx.gbl...
how do I load controls to the templates for the DataList control.
<asp:datalist id="dl1" runat="server" >
<ItemTemplate >
" how to load control(s) here ????"
</ItemTemplate>
</asp:datalist>