Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 29th, 2006, 01:00 PM
Registered User
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Questionnaire how-to?


I apologize if this question has already been answered.

I am just getting started with ASP/ADO.NET and have been given the assignment of developing a multi-page questionnaire.

I have decided to go with the following structure for my answer table:


What I am trying to do (and I apologize if I am phrasing this incorrectly) is pass a 2-dimensional array of questionIds and value pairs to a method, which I have defined in an Object Data Source (an Answer class). I would like to loop over this array and add the name/value pairs to the table.

I have looked everywhere for a real-world ASP.NET solution to this problem and have found nothing (Perhaps I am asking the wrong question, also!).

If any one can provide me with a solid example of how I can achieve this or point me to one, I would be most appreciative.

Any additional explanations, advice, in gathering information related to ASP and ADO.NET are welcome.

Thank you so much!
Old August 29th, 2006, 01:14 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

You may want to take a look at the book ASP.NET 2.0 Instant Results: http://www.wrox.com/WileyCDA/WroxTit...471749516.html

It features a complete chapter about questionnaires called the SurveyEngine. It comes with the full source for the app and a thorough explanation about its inner workings and extensibility points.


Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
Old August 31st, 2006, 11:13 AM
Friend of Wrox
Join Date: Feb 2006
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts

I know this is a forum for assiting fellow programmers but you seem to be in the very, very early stages of a project and your questions are very general.

So another way to get this done is to submit a request for quote to a company that already does this sort of thing...like say...the company I work for :) We can make quick work of any survey project.

That being said, I see you have a basic answer table there. What data type are your answers? Are they all integers? varchar? What about the fact that likely some questions will have integer answers, some decimal answers, and others varchar answers? Some might even involve uploading some type of file...so this demands a more complicated database structure.

If you are planning to just covert everything to varchar and store all datatypes that way, stop and think about the repercussions of that decision. It can be done but it can make reporting and using the data tricky. It also opens the door much wider for corruption of the data, and survey's typically are only worth the cost if they are accurate. Just some food for thought...

Neil Timmerman
Veris Consulting
Old September 7th, 2006, 04:18 PM
Registered User
Join Date: Aug 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for the pointer Imar, the code samples from your book gave me valuable insight for this one particular issue. Nice plug too.

As for your reply, thenoseknows, I think what you're essentially saying is that I should pay you to do the thinking for me, which is absurd.

The schema I'm using is significantly more complex than the glimpse I've provided for this post. I should also think that someone with your "expertise" would be able to infer at least some the column data types by the way they are named.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.