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

Details() public method

Returns the answers associated with the chosen question.
public Details ( int id, String name ) : System.Web.Mvc.ActionResult
id int Selected Question ID
name String
return System.Web.Mvc.ActionResult
        public ActionResult Details(int id, String name)
        {
            if (Session["uid"] == null || Session["uid"].ToString().Equals(""))
            {
                return RedirectToAction("Index", "Home");
            }
            if ((int)Session["user_type"] < User_Type.POLL_MASTER)
            {
                return RedirectToAction("Invalid", "Home");
            }

            ViewData["name"] = name;
            return RedirectToAction("Index", "Answer", new {id, name});
        }