Note that there are some explanatory texts on larger screens.

plurals
  1. POPulling data into a RadioButtonList including randomizing how it is displayed
    text
    copied!<p>I'm new to programming, so bear with me as I try to explain what I"m needing to do. This is in ASP.net iwth VB. I have a quiz project that I've been assigned for work. This quiz project contains two main SQL Databases it pulls the info from. </p> <p>First is a Quiz table, which contains three columns: QuizID (Pri Key), Title, Description. This is where I declare the quizzes, indicated by the QuizID (1, 2, 3....etc)</p> <p>The second table is the Questions table, containing the following columns: QuestionsID (Pri Key), Title, Answer1, Answer2, Answer3, Answer4, Answer5, CorrectAnswer, QuestionOrder, QuizID</p> <p>The QuizID in the Quesitons table matches the QuizID in the Quiz table. Thus for QuizID = 1, it consists of all the questions with the matching QuizID in the Questions table. The CorrectAnswer I want to assign a simple value (1, 2, 3...etc).</p> <p>I need a way to take a set of questions (based on the QuizID) put them in some sort of table and randomize them (or rather shuffle them) so that each time this quiz is taken, it pulls all questions randomly, but not repeating any)</p> <p>I then want the code to pull the question and coorepsonding answers to pick from in a radiobuttonlist. However, It only needs to pull the number of answers. Example, a True/False will only have Answer1 and Answer2. The other Answers will have the NULL value in it. </p> <p>There needs to then be a way to go through each one of these questions that have been placed in the table (in that random order) using a "next" button. When a question and possible answwers are displayed, I alaready have code to keep the answers in the session to grade it at the end (using correctAnswer and selected answer.</p> <p>I have no specific way to bind the data to the Database. I have used SQLDataSource to make other connections before, but I don't know if this is the best way.</p> <p>Thanks in advance for any advice. As I said, I'm a noob, so providing all the code will be helpful.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload