Is it possible to create controls dynamically at run time?
Scenario.
Need to build a page with variable number of controls (composite) to denote an examination. Since the type of questions can vary and will be determined at run time via a selection from the database, I would have say a Yes/No question, a multiple choice question and a "fill here" type question. Is this possible?
Dynamic controls
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 109
- Joined: Mon Sep 21, 2015 9:55 pm
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
The answer to your question is no, you can't create controls dynamically.
But of course you can add rows dynamically to a table. I think I would solve your problem by putting the questions in a table and then displaying the table with a Repeater Control. In each row you could add fields for each type of question e.g. dropdown, radio button, data entry etc then hide/show the appropriate field for each row.
But of course you can add rows dynamically to a table. I think I would solve your problem by putting the questions in a table and then displaying the table with a Repeater Control. In each row you could add fields for each type of question e.g. dropdown, radio button, data entry etc then hide/show the appropriate field for each row.
0 x
Who is online
Users browsing this forum: No registered users and 20 guests