Click here to Skip to main content
15,888,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
can any experts help?

C#
protected void bn_create_Click(object sender, EventArgs e)
        {
            string url = tb_content.Text;
            QRCodeEncoder enc = new QRCodeEncoder();
            Bitmap qrcode = enc.Encode(url);
            
       }




I could make this work with windows form, but not web form. because there is no picture box on web, can anyone help me finish this codes? im using the messaging tool kit.

if u have any other ideas/help it will save my life pls...
Posted
Updated 21-Jun-15 20:01pm
v2

Please take a look this video. This would be useful to you.
 
Share this answer
 
Check this code snippet..
It may help you.

C#
BarcodeLib.Barcode.QRCode barcode = new BarcodeLib.Barcode.QRCode();
     barcode.Data = "123456789012";

     barcode.ModuleSize = 3;
     barcode.LeftMargin = 0;
     barcode.RightMargin = 0;
     barcode.TopMargin = 0;
     barcode.BottomMargin = 0;

     barcode.Encoding = BarcodeLib.Barcode.QRCodeEncoding.Auto;
     barcode.Version = BarcodeLib.Barcode.QRCodeVersion.V1;
     barcode.ECL = BarcodeLib.Barcode.QRCodeErrorCorrectionLevel.L;
     barcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;

     // more barcode settings here

     // save barcode image into your system
     barcode.drawBarcode("c://barcode.png");
    
     // generate barcode & output to byte array
     byte[] barcodeInBytes = barcode.drawBarcodeAsBytes();
    
     // generate barcode to Graphics object
     Graphics graphics = ...;
     barcode.drawBarcode(graphics);
    
     // generate barcode and output to HttpResponse object
     HttpResponse response = ...;
     barcode.drawBarcode(response);
    
     // generate barcode and output to Stream object
     Stream stream = ...;
     barcode.drawBarcode(stream);


Link : http://www.barcodelib.com/net_barcode/barcode_symbologies/qrcode.html[^]
 
Share this answer
 
Please refer below article which talks about how to display a QR code in ASP.NET .


http://www.hanselman.com/blog/HowToDisplayAQRCodeInASPNETAndWPF.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900