Exemple #1
0
        public ActionResult Captcha()
        {
            string code = ValidateHelper.CreateValidateCode(5);

            _session.SetString("ValidateCode", code);
            byte[] bytes = ValidateHelper.CreateValidateGraphic(code);
            return(File(bytes, @"image/jpeg"));
        }