public ActionResult GetCheckCode() { string code; var image = new verify_code().Create(out code); Session["checkCode"] = code; return(File(image.ToArray(), "image/png")); }
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")); }