[thelist] ASP.NET: adding controls to a placeholder

Casey Crookston caseyc at IntelliSoftmn.com
Thu Sep 21 15:47:55 CDT 2006

We're building a page that ask a questions about products (shirts) being
returned to a manufacturer. First, the user is asked, "How many items
will be returned."  Based on the number they enter into the textbox, x,
we need to now repeat this code x times:





    <td><asp: dropdown id="drpSizex" runat="server" /></td>

    <td>color: </td>

    <td><asp: dropdown id="drpColorx" runat="server" /></td>




Then we need to populate each dropdown with data from the database (this
I should be able to handle).  The part I can't figure out is how to
repeat that set of code x times.  Of course a simple for next loop would
do the repeating part.  I've created a place holder on the page.  I can
add the html (<table> etc...) with literal controls, and I can even add
the dropdowns.  But... how do I add the dropdowns at just the right
location? (inside the <td>'s)


Am I overlooking something obvious?




More information about the thelist mailing list