void CreateUrlQRCodeIMG() { Response.Cache.SetCacheability(HttpCacheability.Public); Response.Cache.SetMaxAge(TimeSpan.FromSeconds(600000)); Response.ContentType = "image/gif"; string link = Request.QueryString["url"] ?? string.Empty; if (string.IsNullOrEmpty(link)) { return; } link = HttpUtility.UrlDecode(link); QrEncoder qrEncoder = new QrEncoder(ErrorCorrectionLevel.H); QrCode qrCode = qrEncoder.Encode(link); GraphicsRenderer renderer = new GraphicsRenderer(new FixedModuleSize(8, QuietZoneModules.Four), Brushes.Black, Brushes.White); renderer.WriteToStream(qrCode.Matrix, ImageFormat.Gif, Response.OutputStream); }