DBPOLLDemo.Controllers.QuestionController.Create C# (CSharp) Method

Create() public method

Returns the view with a choice between creating a short answer and multiple choice question.
public Create ( int pollid, String name ) : System.Web.Mvc.ActionResult
pollid int Poll to create question for
name String
return System.Web.Mvc.ActionResult
        public ActionResult Create(int pollid, String name)
        {
            if (Session["uid"] == null || Session["uid"].ToString().Equals(""))
            {
                return RedirectToAction("Index", "Home");
            }
            if ((int)Session["user_type"] < User_Type.POLL_CREATOR)
            {
                return RedirectToAction("Invalid", "Home");
            }

            ViewData["name"] = name;
            ViewData["id"] = pollid;
            return View();
        }