Пример #1
0
        public ActionResult Questions()
        {
            if (Session["user"] == null)
            {
                return(RedirectToAction("Index"));
            }
            try
            {
                string SubjectName = TempData["SubjectName"].ToString();
                ViewBag.SubjectName = SubjectName;
                List <Questions> RandomQuestions = blayer_ob.RandomQuestions(SubjectName);
                ViewBag.RandomQuestions = RandomQuestions;

                return(View());
            }
            catch (Exception)
            {
                return(RedirectToAction("TakeTest"));
            }
        }