public ActionResult Update(CompanyInfoViewModel companyInfo, HttpPostedFileBase UploadFile) { string errorMsgs = ""; if (ModelState.IsValid) { if (cmyInfoBL.UpdateCompanyInfo(companyInfo, out errorMsgs, UploadFile)) { TempData["Success"] = errorMsgs; MvcApplication.Globalvariables(); } else { TempData["Error"] = errorMsgs; // ModelState.AddModelError(string.Empty, errorMsgs); } // _ViewBagList(); } // return Content("<script language='javascript' type='text/javascript'>swal('Thanks for Feedback!');</script>"); return(RedirectToAction("Index")); }