Matias aabye

Matias aabye

  • NA
  • 10
  • 2.8k

Displaying and inserting Quiz Items

May 9 2013 8:39 PM
Hello Everyone. 

I am really new to Visusal Studio / C# / ASP. 

But currently i am doing a little test project, to make a website, with a quiz, where users can go in and fill out information.

I've made the backend, to insert new questions/Answers etc. 

My databases is as following: 

Questions:  ( the tabel for the questions name) 
- Questionsid
- QuestionsName

QuizAnswers ( the tabel for all the differently answers, to each question, that a Administrator create) )
- QuizAnswerID
- QuestionsID
- QuizAnswer
- Correct (True/False) 

But my big problem is this. 

I am used to Dreamweaver and php.

I need to show all the Questions from Questions tabel, and include the answers below the questions. 
The key to combine the 2 tabels are the: "QuestionsID". 
I've searched all of google, with no real results, and right now i am lost... 

So my problem is: 
1. How do i display the questions and the answers, and at the same time to combine the 2 tabels, with the QuestionsId. 
2. How do i repeat that, so that i can repeat the region, until the questions tabel is empty, like if i want to show 10 questions, and all the answers to each question. 

Ex: 
What color is bla bla: (Question name is from the Question tabel) 
1 - Red (The answer is from the Answers tabel) 
2- Blue (The answer is from the Answers tabel) 


Regards
Matias

Answers (6)