Click here to Skip to main content
15,901,373 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to Generate and scan barcode in asp.net using c#.
Posted

The code for the same is:

-Downdload DLL here
-include reference:

C#
using MessagingToolkit.QRCode.Codec;
using MessagingToolkit.QRCode.Codec.Data;

to generate barcode from image:

C#
string url = textBox1.Text;/*textbox string is converted to qrcode*/
            QRCodeEncoder enc = new QRCodeEncoder();
            Bitmap qrcode = enc.Encode(url);
            pictureBox1.Image = qrcode as Image;


and to decode

C#
QRCodeDecoder dec = new QRCodeDecoder();
textBox2.Text = (dec.decode(new QRCodeBitmapImage(pictureBox1.Image as Bitmap)));/*qrcode is reverted back to string*/
 
Share this answer
 
v4
Comments
Abhilask kumar 3-May-13 7:05am    
i'm use web application. so error display in qrcode as Image line. becouse i'm use image control.
Abhilask kumar 3-May-13 7:03am    
Thanks fot this.
But I'm use webapplication and linear barcode.
Thanks7872 3-May-13 7:21am    
Go through this article.
here is one interesting site..

click[^]
 
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