Ejemplo n.º 1
0
        public virtual void ProcessRequest(HttpContext context)
        {
            NameValueCollection queryString = context.Request.QueryString;
            string       text     = queryString[CaptchaControl.KEY];
            HttpResponse response = context.Response;
            Bitmap       bmp      = CaptchaControl.GenerateImage(text);

            bmp.Save(response.OutputStream, ImageFormat.Jpeg);
        }
Ejemplo n.º 2
0
        public void ProcessRequest(HttpContext context)
        {
            NameValueCollection queryString = context.Request.QueryString;
            string       text     = queryString[CaptchaControl.KEY];
            HttpResponse response = context.Response;

            response.ContentType = MediaTypeNames.Image.Jpeg;
            Bitmap bmp = CaptchaControl.GenerateImage(text);

            if (bmp != null)
            {
                bmp.Save(response.OutputStream, ImageFormat.Jpeg);
            }
        }