public ActionResult DeleteBannerLstRow(string Action, string BannerId, string BannerDetailId, string BannerName, string ImagePath) { var filePath = System.Web.HttpContext.Current.Server.MapPath("~/Uploads/" + ImagePath); //string filePath = Server.MapPath("~/Uploads" + ImagePath); if (System.IO.File.Exists(filePath)) { System.IO.File.Delete(filePath); } //if (System.IO.File.Exists(filePath)) //{ // System.IO.File.Delete(filePath); //} string del = objBannerManager.DeleteBannerLstRow(Action, BannerId, BannerDetailId); return(Json(new { del })); }