예제 #1
0
        protected void SubmitClick(object sender, EventArgs e)
        {
            List<QuestionAnswer> questionList = new List<QuestionAnswer>();

            foreach (Control c in uxQuestions.Controls)
            {
                if (c is ITestQuestion)
                {
                    ITestQuestion question = c as ITestQuestion;
                    QuestionAnswer qa = new QuestionAnswer();
                    qa.QuestionText = question.QuestionText;
                    qa.Answer = question.Answer;
                    questionList.Add(qa);
                }
            }
            Session["QuestionList"] = questionList;
            Response.Redirect("Results.aspx");
        }