I currently have a db structure that looks something like what i have below and i was wondering what the best way would be to go about building dynamic forms based on the DB for the Question & Answer input portion.
Also what is the safest way to do this?
QuestionID | Question | DisplayOrder
--------------------------------------------------------------------------------------
1 | Enter the addresses you have lived at in the last 10 years | 1
2 | How much wood could a woodchuck chuck if a woodchuck could chuck wood | 2
AnswerID | QuestionID | Answer | AnswerValueType | DisplayOrder
-----------------------------------------------------------------------------
1 | 1 | Address | Text | 1
2 | 1 | City | Lookup | 2
3 | 1 | State | Lookup | 3
4 | 2 | Enter your guesstimate | Text | 1
ResponseID| PersonID | QuestionID | AnswerID | AnswerValue
--------------------------------------------------------------
1 | 1 | 1 | 1 | 123 W Fake St
1 | 1 | 1 | 2 | Las Vegas
1 | 1 | 1 | 3 | Nevada
2 | 2 | 1 | 1 | 456 W Fake St
2 | 2 | 1 | 2 | Seattle
2 | 2 | 1 | 3 | Washington
1 | 1 | 2 | 1 | What a dumb question
Thanks in advance
Scott Mitchell put together a great 4 part tutorial titled “Creating a Dynamic Data-Driven User Interface” that dynamically builds user interfaces based on a data model. You’re probably looking at a lot of work and testing but it can be done.
You should also check out the 4 part video series, “Building a Quiz Engine“, at http://www.asp.net and see if it helps. The more you can see of ways of this being done, the better.