public ActionResult CreateCategory_Post(Category cat) { Session["ControllerName"] = "Create Category"; if (Session["loginDetails"] != null) { if (ModelState.IsValid) { ProductAdminBLL bll = new ProductAdminBLL(); int res = bll.InsertCategory(cat.Cat_Name); if (res > 0) { return RedirectToAction("Category"); } } return View(); } else { return RedirectToAction("Error"); } }