public ActionResult ValidateCode() { string str = ""; var img = new ValidateCode_Style1().CreateImage(out str); Session["ValidateCode"] = str; return File(img, @"image/jpeg"); }
private void button1_Click(object sender, EventArgs e) { string str = ""; var img = new ValidateCode_Style1().CreateImage(out str); this.pictureBox1.Image = StreamHelper.BytToImg(img); }