title: How to open a URL using browser after scanning QR code in C#?
body: <p>I have created a QR code. I want to open my site after scanning the QR code, but it always only shows text. How can I open a website using a browser after scanning my QR code in C#?</p>
  <p>Here is my qrcode.aspx.cs:</p>
  <pre><code>using MessagingToolkit.QRCode.Codec;
  using System.Drawing;
  using System.Drawing.Imaging;
  
  namespace WebApplication3
  {
      public partial class Default : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
              string url= &quot;http://mysite/login.aspx&quot;;
              QRCodeEncoder encoder = new QRCodeEncoder();
              encoder.QRCodeScale = 10;
              System.Drawing.Image logo = System.Drawing.Image.FromFile(Server.MapPath(&quot;/img/logo.gif&quot;));
  
              Bitmap img = encoder.Encode(url);
              Graphics g = Graphics.FromImage(img);
              int left = (img.Width - logo.Width) / 2;
              int top = (img.Height - logo.Height) / 2;
              g.DrawImage(logo, new Point(left, top));
              img.Save(Server.MapPath(&quot;/qrcode/&quot; + url+ &quot;.jpg&quot;), ImageFormat.Jpeg);
              Image1.ImageUrl = &quot;/qrcode/&quot; + url+ &quot;.jpg&quot;;
          }
      }
  }
  </code></pre>