QR-Code is also known as Quick Response Code, Denso Barcode, QRCode, JIS X 0510, ISO/IEC 18004.
Compatibility: Barcode for .NET component SDK is compatible with ISO/IEC 18004 (Second Edition 2006-09-01) bar code symbology specification.
QR Code barcode is a matrix (or two-dimensional) symbology designed by Denso Wave for the automotive industry. Now QR Code has grown popular due to its fast readability and large storage capacity, compared with linear barcodes.
QR Code barcode is a matrix (or two-dimensional) symbology designed by Denso Wave for the automotive industry. Now QR Code has grown popular due to its fast readability and large storage capacity, compared with linear barcodes.
Add Barcodelib.Barcode.ASP.NET.dll or BarcodeLib.Barcode.WinForms.dll to your C# project reference.
Click "Project" and select "Add Reference...".
Click "Project" and select "Add Reference...".
Add BarcodeLib barcoding dlls to Visual Studio Toolbox.
Right click in Toolbox and select "Choose Items...".
In the pop-up window, click "Browse..." to locate the dll BarcodeLib.Barcode.WinFroms.dll or Barcodelib.Barcode.ASP.NET.dll.
Click "OK" and you will find four items listed in VS Toolbox, for example QRCodeWinForm, DataMatrixWinForm, LinearWinForm, and PDF417WinForm. And now it's done!
Implement
Now you can copy the C# sample code below to create a QR Code barcode image in .NET Class Library.
BarcodeLib.Barcode.QRCode qrbarcode = new BarcodeLib.Barcode.QRCode();
// Select QR Code data encoding type: numeric, alphanumeric, byte, and Kanji to select from. qrbarcode.Encoding = BarcodeLib.Barcode.QRCodeEncoding.Auto; qrbarcode.Data = "123456789012";
// Adjusting QR Code barcode module size and quiet zones on four sides. qrbarcode.ModuleSize = 3; qrbarcode.LeftMargin = 12; qrbarcode.RightMargin = 12; qrbarcode.TopMargin = 12; qrbarcode.BottomMargin = 12;
// Select QR Code Version (Symbol Size), available from V1 to V40, i.e. 21 x 21 to 177 x 177 modules. qrbarcode.Version = BarcodeLib.Barcode.QRCodeVersion.V1;
// Set QR-Code bar code Reed Solomon Error Correction Level: L(7%), M (15%), Q(25%), H(30%) qrbarcode.ECL = BarcodeLib.Barcode.QRCodeErrorCorrectionLevel.L; qrbarcode.ImageFormat = System.Drawing.Imaging.ImageFormat.Png;
// More barcode settings here, like ECI, FNC1, Structure Append, etc.
// save barcode image into your system qrbarcode.drawBarcode("c:/qrcode.png");
// Generate QR Code barcode & output to byte array byte[] barcodeInBytes = qrbarcode.drawBarcodeAsBytes();
// Generate QR Code barcode to Graphics object Graphics graphics = ...; qrbarcode.drawBarcode(graphics);
// Generate QR Code barcode and output to HttpResponse object HttpResponse response = ...; qrbarcode.drawBarcode(response);
// Generate QR Code barcode and output to Stream object Stream stream = ...; qrbarcode.drawBarcode(stream);
Above Free QR Code sample code is written in Visual C# 2005
How to Generate QR-Code Bar Code in C# Generator for ASP.NET Web Applications?
With this C# QR Code generator, you can stream QR Code barcode images in ASP.NET using C#.NET in two ways.
The simplest way for QR Code barcode generation is through BarcodeLib Buildin ASP.NET Barcode Application.
Unzip the downloaded evaluation package, and copy barcode folder and its contents to your IIS folder, eg. C:\inetpub.
Create a new virtual directory in your IIS, name it "barcode", and connect it to the above "barcode" folder in inetpub.
Restart IIS for a barcoding test.
To test your installation, open your web browser and navigate to: http://YourDomain:Port/barcode/qrcode.aspx?Data=12345678&LeftMargin=12&RightMargin=12&TopMargin=12&BottomMargin=12 For further QR Code barcode setting, please view more web stream QR Code URL parameters here: .NET QR-Code Generator Property Settings.
To insert this QR Code image in your aspx or html page, simply pass the url to IMG tag or src value. For example: <img src=http://YourDomain:port/barcode/qrcode.aspx?Data=12345678&LeftMargin=12&RightMargin=12&TopMargin=12&BottomMargin=12 /> This method will not generate any barcode images in your IIS server side.
Another method is to create QR Code barcodes through ASP.NET web form controller.
Intall ASP.NET barcode controller to your barcoding project by adding reference.
Add barcode library to your Visual Studio toolbox.
Open your unzipped trial package, and copy files "qrcode.aspx", "qrcode.aspx.cs" to the aspx page, in which you will be generating QR Code images
Now you can drag QRCodeASPNET to your ASP.NET web site, and change QR code settings through properties window on the right or use above free C# source code.
Debug and you will see the QR Code barcode generated on your aspx pages.
How to Create QR-Code Barcodes in C# Generator for Windows Applications?
Add reference to BarcodeLib.Barcode.WinForms.dll for your C# barcoding project.
Add BarcodeLib.Barcode.WinForms.dll to your Visual Studio toolbox.
Now please drag the QRCodeWinForm to your windows form or use above free C# source code, and a QR Code barcode is generated.
C# Barcode Generator Library Supported Linear & 2D Barcodes