I have a page that, depending on input from a previous page, lists a varying number of different questions pulled from a database. I can’t seem to find an example of this online: For each question that is displayed, I need to programmatically generate a DropDownList so that the user can select yes or no for each of these questions. Hoping someone here can give me some direction on where to look.
Share
Probably your best bet is to use the Repeater control with a template that just contains the dropdownlist with static list items. Something like this:
Then in your code behind, you can execute your query and bind the results to the repeater.