예제 #1
0
        public ActionResult GetCheckCode()
        {
            string code;
            var    image = new verify_code().Create(out code);

            Session["checkCode"] = code;
            return(File(image.ToArray(), "image/png"));
        }
예제 #2
0
        public FileContentResult ValidateCode()
        {
            string code = "";

            System.IO.MemoryStream ms = new verify_code().Create(out code);
            Session["gif"] = code;
            Response.ClearContent();
            return(File(ms.ToArray(), @"image/png"));
        }