public ActionResult ChangePassword(ChangePassword chng) { if (ModelState.IsValid) { // up.ConfirmPassword = up.Password; var pass = cl.ChangePassword(chng); if (pass == true) { return(RedirectToAction("Profile")); } else { ModelState.AddModelError("Wrong", "Old Password Wrong"); } } return(View(chng)); }