KA.Barcode for ASP.NET
How to Print QR Code in ASP.NET with Valid Data
Complete ASP.NET source code to generate, print QR Code images using Barcode Generator for .NET Control
  • Easy to use, integrate 2D QR Code generation component into ASP.NET
  • Easy-to-use barcode generator provided, such as barcode ASP.NET, Word barcode, .NET barcode & .NET WinForms barcode
  • Support to create 2D QR Code barcode in Microsoft Internet Information Service (IIS)
  • Generating, printing high-quality 2D QR Code images for web browsers that retrieve a URL to display an image
  • Encode numeric, alphanumeric, byte and Kanji characters for QR Code in webform/ websites
  • Provide barcode SDK for implementing barcodes as you wish, like Word Intelligent Mail, QR Code ASP.NET, .NET Intelligent Mail, Word Interleaved 2 of 5, etc.
  • Provide dynamic data modes to simplify, accelerate QR Code data encoding in ASP.NET web pages/ web service
  • Simple to adjust error correction on Reed-Solomon algorithm in L, M, H, Q
  • Accurate QR Code generation configured to ISO / IEC 18004 (2nd edition)
  • Also create, produce GS1 compatible QR Code matrix bar codes in ASP.NET webform/ website
QR Code Barcode API for ASP.NET is a barcoding functionality of KA.Barcode Generator for ASP.NET control software to generate, print high-quality QR Code images in ASP.NET projects. With full integration into .NET Framework and Microsoft Visual Studio, it runs easily in C#, VB.NET, Visual Studio as well as Internet Information Service. This document gives detailed steps for encoding QR Code valid character in ASP.NET, IIS and QR Code size, image setting as well:
QR Code Barcode Information
QR Code is a matrix barcode also named Denso Barcode, QRCode, Quick Response Code, JIS X0510, ISO/IE18004.

QR Code for ASP.NET encodes:

  • Numeric data
  • Alphanumeric data
  • Byte data
  • Kanji characters

QR Code for ASP.NET data capacity:

  • Numeric data (max): 7,089 characters
  • Alphanumeric data (max): 4,296 characters
  • Byte data (max): 2,953 characters
  • Kanji characters (max): 1,817 characters
QR Code Data Encoding in C#, VB.NET Class Library

Install QR Code Barcode Web Control Generator into ASP.NET Projects

  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 those following C# or VB.NET barcoding procedure onto you forms to insert, string a QR Code in ASP.NET:
using KeepAutomation.Barcode.Bean;
BarCode barcode= new BarCode();
barcode.Symbology= KeepAutomation.Barcode.Symbology.QRCode;
barcode.CodeToEncode = "QR Code";
Dim barcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

barcode.Symbology= KeepAutomation.Barcode.Symbology.QRCode
barcode.CodeToEncode = "QR Code"
QR Code barcode creation and printing features into you VB.NET applications, such as ASP.NET web pages, WinForms, Crystal Reports, VB.NET class...
Matrix; Easily drag and drop the barcode control to print QR Code barcodes in ASP.NET webforms & ....
Bitmap formats with C#.NET programming; Multiple properties to select such as QR Code version, data mode, error correction lever (ECL), Structure...
QR Code in .NET Application. How to generate & print QR Code images using free demo in ASP.NET, WinForms, C#, VB.NET class library. ....
How to Generate QR Code in VB.NET application. How to generate 2D QR Code barcode images in VB.NET, ASP.NET web applications, and windows forms. ....

Printing QR Code with Alphanumeric Mode

QR Code barcode generator for ASP.NET offers QR Code Alphanumeric mode to encode numeric digits 0 - 9, upper-case letters A - Z, and nine other characters: space, $ % * + - . / :. Follow the codings below to convert text data value into a QR Code image:
barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.AlphaNumeric;
barcode.CodeToEncode = "QR-Code";
barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.AlphaNumeric
barcode.CodeToEncode = "QR-Code"

Creating QR Code with Byte Mode

QR Code barcode generator for ASP.NET also supports to create QR Code Extension barcodes, which encodes all standard ASCII characters (0-127). Replace sample code with following one:
barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.Byte;
barcode.CodeToEncode = "*%$#";
barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.Byte
barcode.CodeToEncode = "*%$#"

Generating QR Code with Numeric Mode

QR Code barcode generator for ASP.NET allows users to encode numeric data: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Replace sample code with following one to convert text data into a QR Code image:
barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.QRCode;
barcode.CodeToEncode = "12154";
barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.QRCode
barcode.CodeToEncode = "12154"

Streaming QR Code with Kanji Mode

QR Code barcode generator for ASP.NET allows users to encode Kanji characters in accordance with SJIS: from ~9XXXXX (Shift JIS 0x8140 ~ 0x9FFC and 0xE040 ~ 0xEBBF). Replace sample code with following one:
 barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.Kanji;
barcode.TildeEnabled = true;
barcode.CodeToEncode = "~958538";
 barcode.QRCodeDataMode = KeepAutomation.Barcode.QRCodeDataMode.Kanji
barcode.TildeEnabled = true
barcode.CodeToEncode = "~958538"

Inserting QR Code with Application Identifier Add-on in ASP.NET Web Pages

QR Code barcode generator for ASP.NET supports to encode GS1 compatible QR Code barcode with different digit Application Identifiers add-on:
  • ~ai2 = 2 digits
  • ~ai3 = 3 digits
  • ~ai4 = 4 digits
  • ~ai5 = 5 digits
  • ~ai6 = 6 digits
  • ~ai7 = 7 digits
barcode.TildeEnabled = true;
barcode.CodeToEncode = "~ai21234~ai516156468498";
barcode.FNC1 = KeepAutomation.Barcode.FNC1.First;
barcode.TildeEnabled = true
barcode.CodeToEncode = "~ai21234~ai516156468498"
barcode.FNC1 = KeepAutomation.Barcode.FNC1.First
QR Code Data Encoding 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 and choose "Symbology" to "QRCode"
  5. 5.
    Then input QR Code valid character in "CodeToEncode" accordingly
  6. 6.
    You may choose different QR Code Data Mode in "QRCodeDataMode"
  7. 7.
    A QR Code barcode with different characters occurs
QR Code Data Encoding in 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"
  5. 5.
    A QR Code barcode with numeric data will be displayed
Note: In IIS, Symbology.QRCode is 103. For different data mode, QRCodeDataMode.Auto is 0; QRCodeDataMode.AlphaNumeric is 1; QRCodeDataMode.Byte is 2; QRCodeDataMode.Numeric is 3; QRCodeDataMode.Kanji is 4; and QRCodeDataMode.Customer is 5. Users may write "symbology=103&code-to-encode=xxx" or "symbology=103&qrcode-data-mode=x&code-to-encode=xxx" accordingly to change encoded data.