Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string code = CheckCode.GenerateCheckCode();

            byte[] bytes = CheckCode.CreateImage(code);
            //byte[] bytes = CheckCode.CreateVane("2.7");
            Session["CheckCode"] = code;
            Response.ClearContent();
            Response.ContentType = "image/Gif";
            Response.BinaryWrite(bytes);
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string code = CheckCode.GenerateCheckCode();

            byte[] bytes = CheckCode.CreateImage(code);


            //System.IO.MemoryStream ms = new System.IO.MemoryStream();
            //image.Save(ms, System.Drawing.Imaging.ImageFormat.Png);
            Response.ClearContent();
            Response.ContentType = "image/Gif";
            Response.BinaryWrite(bytes);
        }