protected void AddQuestionClicked(object sender, EventArgs e)
        {
            Question newQuestion = new Question();
            newQuestion.QuestionText = question.Text;
            Answer firstAnswer = new Answer() { AnswerText = answer1.Text, IsAnswerCorrect = check1.Checked };
            Answer secondAnswer = new Answer() { AnswerText = answer2.Text, IsAnswerCorrect = check2.Checked };
            Answer thirdAnswer = new Answer() { AnswerText = answer3.Text, IsAnswerCorrect = check3.Checked };
            Answer fourthAnswer = new Answer() { AnswerText = answer4.Text, IsAnswerCorrect = check4.Checked };

            _Questions.Add(newQuestion);
            ViewState["Questions"] = _Questions;

            pageTitle.Text = $"Question {_Questions.Count + 1}";
            ClearFields();
        }
예제 #2
0
 public QuestionWrapper(Question question)
 {
     Question = question;
     Answer = new Answers();
 }