Solved

Good placeholder example for database driven questionnaire

Posted on 2010-11-12
3
781 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 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:
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 1

Author Closing Comment

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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 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

21 Experts available now in Live!

Get 1:1 Help Now