Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
Métodos Frequentes
/// <summary> /// 生成图形验证码 /// </summary> /// <returns>图形验证码</returns> public ActionResult Captcha() { var code = CaptchaHelper.GetRandomCode(4); var codeStream = CaptchaHelper.IdentifyImg(code, 20, 30); Session[CAPTCHA] = code; return(File(codeStream.ToArray(), @"image/jpeg")); }