Solved

Good placeholder example for database driven questionnaire

Posted on 2010-11-12
3
778 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:BobCSD
  • 2
3 Comments
 
LVL 5

Assisted Solution

by:JayFromPep
JayFromPep earned 500 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 1

Accepted Solution

by:
BobCSD 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 1

Author Closing Comment

by:BobCSD
ID: 34276788
mine answers the question
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now