public JsonResult NotApproveProduct(int id) { var ret = ""; try { pp.RejectProduct(id); ret = "Rejected"; //return Json(ret, JsonRequestBehavior.AllowGet); } catch (Exception ex) { ret = ViewBag.error = "Product Rejection Failed !!!" + ex; //return Json(ViewBag.error, JsonRequestBehavior.AllowGet); } return(Json(ret, JsonRequestBehavior.AllowGet)); }