I'm on a limb here..
What I want is this:
The myform class has a collection of objects. For each of those objects I want an 'ItemTemplate' to be repeated, but:
sometimes the result of a row is a dropdown box, then a textbox, etc.
The problem isn't on of databinding, but in generating the a control. Most examples do something like:
Problem is that I cannot use the <asp:TextBox/> notation, because I do not know in advance if it is going to be a textbox..
What I want is this:
Code:
<cc1:myform id="myform1" runat="server">
<ItemTemplate>
[insert datadriven webcontrol here]<br>
</ItemTemplate>
</cc1>
The myform class has a collection of objects. For each of those objects I want an 'ItemTemplate' to be repeated, but:
sometimes the result of a row is a dropdown box, then a textbox, etc.
The problem isn't on of databinding, but in generating the a control. Most examples do something like:
Code:
<cc1:myform id="myform1" runat="server">
<ItemTemplate>
<asp:TextBox runat="server" text="<% Container.Whatever%>"/><br>
</ItemTemplate>
</cc1>
Problem is that I cannot use the <asp:TextBox/> notation, because I do not know in advance if it is going to be a textbox..