Hi everyone,
I've been working with ASP.Net for about a month, and in all the samples
I've seen the authors know ahead of time how many DropDownLists or Labels
they're going to need.
My problem is that I don't always know at design time how many (for
instance) DropDownLists I'll need. As an example, one of my old asp pages
queries a table and loops through the resulting recordset, adding one
DropDownList per entry and populating it with the values from another
recordset.
I'm not sure how best to do this sort of "dynamic control creation" in
asp.net and was wondering if anyone could post a bit of sample code or nudge
me in the right direction? Should I / must I do this sort of thing in the
aspx file or can it be done in the code-behind file too? I'm not sure.
Thanks for the help.
-Jim