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

Chris at globet.com Chris at globet.com
Fri Sep 22 04:44:53 CDT 2006


Casey

> 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:
> 
> <table>
>   <tr>
>     <td>Size:</td>
>     <td><asp: dropdown id="drpSizex" runat="server" /></td>
>     <td>color: </td>
>     <td><asp: dropdown id="drpColorx" runat="server" /></td>
>   </tr>
> </table>
> 
> 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?

I'm not sure if you've overlooked them or decided against using them,
but why not use HtmlTable, HtmlRow and HtmlCell objects?

-- 
Chris Marsh
Software Developer
t: +44 20 8246 4804 x828
f: +44 20 8246 4808
e: chris at globet.com
w: http://www.globet.com/

Any opinions expressed in this email are those of the individual and not
necessarily the Company. This message is intended for the use of the
individual or entity to which it is addressed and may contain
information that is confidential and privileged and exempt from
disclosure under applicable law. If the reader of this message is not
the intended recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly prohibited.
If you have received this communication in error, please contact the
sender immediately and delete it from your system. 



More information about the thelist mailing list