Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   ASP.NET (http://www.programmingforums.org/forum35.html)
-   -   ASP.NET Survey Help (http://www.programmingforums.org/showthread.php?t=15131)

Robocop Feb 6th, 2008 9:15 PM

ASP.NET Survey Help
 
I want to do a survey with ASP.NET and SQL Server 2005, and I'm looking for advice here.

I have the graphical design done, but I need help on the tables that would be needed for this, and how to store the radiobutton values into those tables.

I also have a table where I'm storing the information of the applicant that will fill the survey, but I have that done.


Example

1. Are you at least 18 years of age?

() Yes

() No


2. How is your knowledge of computers?

() Excellent

() Great

() Average

() Below Average



Thanks in advance!

Ghost Feb 6th, 2008 9:34 PM

Re: ASP.NET Survey Help
 
I'd store the questions seperate from the answers for starters.

tabQuestions - This will hold all of your questions, and maybe what test they belong to?
tabAnswers - This will Hold your Answers for your Questions tabQuestions
tabSurvey - This will hold the info of each Survery, basically it will tell you what question was asked and the answer to it.

Lets say tabQuestions looked like this:

ID, TestID, Question, Sort
1, 1, Are you at least 18 years of age?, 0
2, 1, How is your knowledge of computers?, 1


tabAnswers like this:

ID, QuestionID, Answer, Sort
1, 1, Yes, 0
2, 1, No, 1
3, 2, Excellent, 0
4, 2, Great, 1
5, 2, Average, 2
6, 2, Below Average, 3


tabSurvery like this:

ID, Survery, TestID, QuestionID, AnswerID
1, 1, 1, 1, 1
2, 1, 1, 2, 2


That should do I think.

Basically I said for the 1st Test you made, the first time anyone took it, I was 18 with great knowledge of computers.

Hope that helps you a little.

Robocop Feb 7th, 2008 10:13 PM

Re: ASP.NET Survey Help
 
Thanks for your help.

I managed to save the answers id's into the database by using the radiobuttonlist's Value property, and using the text property to display the possible answers.

Also, used the Session object to store the ID of the person, and this way passing it into other webforms!

Again Thanks


All times are GMT -5. The time now is 3:55 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC