public ActionResult AddUser(user u) { bool result = repo.Register(u); if (result) { ViewBag.Msg = "User Added Successfully!"; } else { ViewBag.ErrorMsg = "Error occured while adding user"; } return(View("UserRegister")); }