public ActionResult GetValidateCode() { string code = CaptchaHelper.CreateCode(5); Session["ValidateCode"] = code; byte[] bytes = CaptchaHelper.CreateValidateGraphic(code); return(File(bytes, @"image/jpeg")); }