Solved

Good placeholder example for database driven questionnaire

Posted on 2010-11-12
3
788 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

707 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