예제 #1
0
        protected void uxSubmitButton_Click(object sender, EventArgs e)
        {
            List<QuestionAnswer> answerList = 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;
                    answerList.Add(qa);
                }
            }

            Session.Add("answers", answerList);

            Server.Transfer("Results.aspx", true);
        }