Esempio n. 1
0
 public ActionResult QuenMatKhau(string email, string myCaptcha, string attempt)
 {
     if (CaptchaHelper.VerifyAndExpireSolution(HttpContext, myCaptcha, attempt))
     {
         ViewData["KiemTraCaptcha"] = true;
         orderSubmitter.SendEmail(email);
         return(View("LayMatKhauThanhCong"));
     }
     else
     {
         ViewData["KiemTraCaptcha"] = false;
         return(View());
     }
 }
Esempio n. 2
0
        public ActionResult QuenMatKhau(string email, string myCaptcha, string attempt)
        {
            // Kiểm tra Captcha

            if (CaptchaHelper.VerifyAndExpireSolution(HttpContext, myCaptcha, attempt))
            {
                // In a real app, actually register the user now
                ViewData["KiemTraCaptcha"] = true;
                orderSubmitter.SendEmail(email);
                return(View("LayMatKhauThanhCong"));
            }
            else
            {
                // In a real app, redisplay the view with an error message

                ViewData["KiemTraCaptcha"] = false;
                return(View());
            }
        }