KA.Barcode for ASP.NET
How to Generate QR Code Image in ASP.NET Projects
ASP.NET source code to generate, print QR Code in different image formats using Barcode for ASP.NET Control
  • Easy to integrate 2D QR Code (Quick Response Code) generation component into ASP.NET
  • Provide detailed generation guides online, such as .NET WinForms barcode generation, .NET barcode sample & ASP.NET barcode creation
  • Support barcoding, printing matrix QR Code bar codes in Internet Information Service
  • Provide dynamic image formats to save 2D QR Code, such as GIF, JPG/JPEG, BMP, and TIFF & PNG
  • Simple to output high-quality QR Code pictures with perfect resolution
  • Draw best matrix QR Code images compatible with all major web browsers
  • Accurate QR Code generation configured to ISO / IEC 18004 (2nd edition 2006-09-01)
  • Supports EAN 128 Java , Code 39 C#, EAN-13 VB.NET, ISBN Java and many other barcode types
  • Dynamically create multiple GS1 compatible QR Code in ASP.NET programs
  • Thermal printers support to print accurate QR Code images with high-quality even on low-resolution printers
QR Code maker control SDK library for ASP.NET is a great barcode generating component device for making & barcoding multiple QR Code barcodes in ASP.NET applications (web page/ webform/ website) using C#, Visual Basic.NET and URL. This document gives details to manipulate QR Code image in ASP.NET. IIS; other QR Code related developer guide please link to:
QR Code Image Setting with C#, VB.NET Class in ASP.NET

Install QR Code Barcode Maker in ASP.NET

  1. 1.
  2. 2.
    Add reference: Add "KeepAutomation.Barcode.Web.dll" to your ASP.NET project reference
  3. 3.
    Add to toolbox: To add BarcodeControl to your ASP.NET toolbox
Copy the C# or VB.NET barcode syntax onto you forms to convert data into a QR Code in ASP.NET webform/ website:
using KeepAutomation.Barcode.Bean;
BarCode barcode= new BarCode();
barcode.Symbology= KeepAutomation.Barcode.Symbology.QRCode;
barcode.CodeToEncode = "QR Code";
barcode.generateBarcodeToImageFile("C://barcode-qrcode-csharp.gif");
Dim barcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

barcode.Symbology= KeepAutomation.Barcode.Symbology.QRCode
barcode.CodeToEncode = "QR Code"
barcode.generateBarcodeToImageFile("C://barcode-qrcode-vbnet.gif")

Append Several QR Code Barcodes into a Structured One

QR Code can be divided up to 16 and reconstructed into one format. With KA.Barcode for ASP.NET, users may enable "GroupEnabled" function, and use "GroupItemId" to count the total number of QR Code and use "GroupItemCount" to number QR Code symbols (Note: it starts with 0). Beside, do not forget to make all QR Code within the same "GroupId".
First Segement:
barcode.GroupEnabled = true;
barcode.GroupId = 23;
barcode.GroupItemCount = 2;
barcode.GroupItemId = 0;

Second Segement:
barcode.GroupEnabled = true;
barcode.GroupId = 23;
barcode.GroupItemCount = 2;
barcode.GroupItemId = 1;
First Segement:
barcode.GroupEnabled = true
barcode.GroupId = 23
barcode.GroupItemCount = 2
barcode.GroupItemId = 0

Second Segement:
barcode.GroupEnabled = true
barcode.GroupId = 23
barcode.GroupItemCount = 2
barcode.GroupItemId = 1

Change QR Code Barcode Image Rotation in ASP.NET Web Page

To adjust QR Code position, KA.Barcode Generator for ASP.NET provides selectable barcode image orientation to rotate QR Code Barcode barcodes into any angles of 0, 90, 180 or 270 degrees with "Orientation" property. The default is Degree0. Below is the ASP.NET MVC code to rotate a QR Code image.
barcode.Orientation = KeepAutomation.Barcode.Orientation.Degree180;
barcode.Orientation = KeepAutomation.Barcode.Orientation.Degree180

Adjust QR Code Barcode Horizontal Alignment inside the Image

Besides image resolution, the placement of barcode horizontal alignment inside the image makes QR Code barcodes look different. Using KA.Barcode Generator for ASP.NET, you can easily change bar alignment with "BarAlignment" to "right", "center" or "left"; and the default is "Center".
barcode.BarAlignment = AlignmentHori.Center;
barcode.BarAlignment = AlignmentHori.Center
QR Code Image Setting with Drag & Drop BarcodeControl
  1. 1.
    In "Choose Toolbox Items" form, click button "Browse...", and select KeepAutomation.Barcode.Web.dll
  2. 2.
    Now you'll see BarCodeControl in your toolbox
  3. 3.
    Drag and drop the BarCodeControl into the Forms and a Codabar image is generated
  4. 4.
    Open your barcode setting panel
  5. 5.
    Choose "Symbology" to "QRCode"
  6. 6.
    Set "Orientation" to "Degree180" and "BarAlignment" to "Right"
  7. 7.
    Then a QR Code with customized image occurs
QR Code Image Setting in Microsoft Internet Information Service (IIS)
  1. 1.
    Copy folder "barcode" in your download the trial package to your IIS web application folder
  2. 2.
    Create a virtual directory, named "barcode", and link to your just copied "barcode" folder
  3. 3.
    Restart IIS and now you have successfully installed the ASP.NET Barcode Generator web application
  4. 4.
    To test it, open your web browser, and navigate to "http://localhost/barcode/barcode.aspx?symbology=103&code-to-encode=0123456789&orientation=3&bar-alignment=2"
  5. 5.
    A QR Code barcode with numeric data will be displayed
  6. 6.
    If you want to barcode embed in HTML or ASP scripts as an image, insert the <IMG> tag: <img src="http://localhost/barcode/barcode.aspx?symbology=103&code-to-encode=0123456789&orientation=3&bar-alignment=2"/>