public ActionResult ResetPassword1(string rt) { if (SessionManager.IsUserLoggedIn) { return(RedirectToAction("Index", "Home")); } else { try { UserInfoRepository repo = new UserInfoRepository(); if (repo.IsValidResetToken(rt)) { ViewBag.data = rt; return(View()); } else { TempData["Msg"] = "Invalid password reset token!"; return(RedirectToAction("Index")); } } catch (Exception ex) { return(RedirectToAction("Index")); } } }