public ActionResult ProdEdit_post(ProductDetails productdetails) { Session["ControllerName"] = "Prod Edit"; if (Session["loginDetails"] != null) { getDdlsForProduct(); ViewBag.DDLBrand = new SelectList(ddlbrand, "Value", "Text").ToList(); //ViewBag.SubCategory = new SelectList(ddlSubCategory, "Value", "Text").ToList(); ProductAdminBLL bll = new ProductAdminBLL(); int res = bll.updateProduct(productdetails); if (res > 0) { return RedirectToAction("ProductList"); } return View(); } else { return RedirectToAction("Error"); } }