?
Solved

Good placeholder example for database driven questionnaire

Posted on 2010-11-12
3
Medium Priority
?
797 Views
Last Modified: 2013-12-17
Does anyone know where I can find a good placeholder tutorial/project example?

I want to store a questionnaire in a database table, defining whether to use a radio, text field, combobox, etc., then loop through the table, building my form and displaying it on the page. Then retrieve the data from the form fields, and store back in the table.

Using VS2010, 4.0 framework. C# or VB.NET is fine.

Thanks!
0
Comment
Question by:Starr Duskk
  • 2
3 Comments
 
LVL 5

Assisted Solution

by:JayFromPep
JayFromPep earned 2000 total points
ID: 34121228
I would use a repeater.

Each question would be a record in a table of possible questions.  Based on your query, you populate the repeater with information retrieved.

On submit, grab the value from the fields and put it back into the database.
0
 
LVL 2

Accepted Solution

by:
Starr Duskk earned 0 total points
ID: 34122885
A repeater template must repeat the same type of object: text field, radio button or combobox, etc.

Row one might be a text field and a combobox, row two might be a radio button, row three might be a text field only, and so on.

I don't think a repeater will allow that. I do know a placeholder will.

I found these snippets of code:
http://www.beansoftware.com/ASP.NET-Tutorials/Dynamic-User-Interface.aspx
 
http://www.4guysfromrolla.com/articles/081402-1.aspx
 
http://www.denisbauer.com/ASPNETControls/DynamicControlsPlaceholder.aspx
 
http://www.startvbdotnet.com/aspsite/controls/panel.aspx
 
http://www.w3schools.com/aspnet/control_placeholder.asp


And for repeaters, I found this one on creating a repeater template programmatically:
http://msdn.microsoft.com/en-us/library/Aa289501

0
 
LVL 2

Author Closing Comment

by:Starr Duskk
ID: 34276788
mine answers the question
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question