コード例 #1
0
        public ActionResult CreateTrueFalse(AddQuestionVM addQuestionModel)
        {
            //take data out of parameter passed in from AddQuestion view and assign to the following VM
            CreateTrueFalseVM trueFalseModel = new CreateTrueFalseVM();

            return(View("CreateTrueFalse", trueFalseModel));
        }
コード例 #2
0
        public ActionResult CreateTrueFalse(CreateTrueFalseVM trueFalseModel)
        {
            if (!ModelState.IsValid)
            {
                return(View("CreateTrueFalse", trueFalseModel));
            }

            //Add values from trueFalseModel to viewQuizModel
            ViewQuizVM viewQuizModel = new ViewQuizVM();

            return(RedirectToAction("ViewQuiz", viewQuizModel));
        }