public JsonResult DeleteProduct(int id) { var ret = ""; try { pp.DeleteVendorProductGet(id); ret = "Deleted"; } catch (Exception ex) { ret = ViewBag.mm = "Product deletion failed !!!" + ex; //return Json(ViewBag.mm, JsonRequestBehavior.AllowGet); } return(Json(ret, JsonRequestBehavior.AllowGet)); }