Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Custom repeaters

Status
Not open for further replies.

rveer

Programmer
Oct 26, 2002
6
0
0
NL
I'm on a limb here..

What I want is this:

Code:
<cc1:myform id=&quot;myform1&quot; runat=&quot;server&quot;>
      <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=&quot;myform1&quot; runat=&quot;server&quot;>
      <ItemTemplate>
           <asp:TextBox runat=&quot;server&quot; text=&quot;<% Container.Whatever%>&quot;/><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..
 
Never mind, I got it working!

I am using asp:placeholders with certain names and I replace them by overloading the AddParsedSubObject() method of a custom iterator template..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top