public ActionResult EmailConfig(EmailConfigViewModel model) { if (ModelState.IsValid) { string UserID = _userManager.GetUserId(User); int SuccID = _DbPortal.InsertUpdateT_PRT_REF_EMAIL_TEMPLATE(model.selEmailTemplate.EMAIL_TEMPLATE_ID, model.selEmailTemplate.SUBJ, model.selEmailTemplate.MSG, UserID); if (SuccID > 0) { TempData["Success"] = "Data Saved."; } else { TempData["Error"] = "Data Not Saved."; } } return(RedirectToAction("EmailConfig", new { id = model.selEmailTemplate.EMAIL_TEMPLATE_ID })); }