Home  >  ASP.NET Barcode Generator Components  >  How to Print Barcode in ASP.NET  >  Create QR Code in ASP.NET projects
QR Code ASP.NET Generator Library
QR Code ASP.NET Generator SDK can insert, draw, or generate qr code 2D barcodes in asp.net web server applications in C# and VB.NET.
Overview - ASP.NET QR Code Generator
The QR Code ASP.NET Barcode generator, provided by KeepDynamic.com, is a barcode generation component SDK for creating QR Codes in your ASP.NET projects. This QR-Code generator is entirely built in C#.NET Framework.
Following are related solutions for generating QR Code image by using ASP.NET barcode control:
Features - QR Code Encoding DLL for ASP.NET

QR Code ASP.NET Barcode Generator | Technology

QR Code Barcode Generator for ASP.NET | QR Code Image

Diversified options of ASP.NET QR Code Barcode generator are supplied for easily configuring the QR Code barcodes.
View more about QR Code Barcode Properties of ASP.NET Barcode Generator Library
How to Generate QR Code in ASP.NET Applications
There are two ways to generate QR Code in ASP.NET applications.

Generate QR Code in ASP.NET Web Controller

  1. Add KeepDynamic.BarCode.AspNet.dll to your ASP.NET project and Visual Studio Toolbox
  2. Copy "qrcode.aspx", "qrcode.aspx.cs" from barcode folder to your asp.net project
  3. Drag & drop QRCodeControl from the Toolbox to your project and adjust the image settings in the Properties window

Generate QR Code in ASP.NET Class Applications

  1. Add KeepDynamic.BarCode.AspNet.dll to your ASP.NET project and Visual Studio Toolbox
  2. You can also generate QR Code barcode image using following C# or VB.NET class codes

C# Code for QR Code Barcode Generation in ASP.NET

// Create QR-Code barcode object in C#
QRCode barcode = new QRCode();

// Set QR-Code barcode value in C#
barcode.CodeText = "QRCode in C#";

// Set QR Code module size
barcode.X = 4;

// Set QR Code quiet zone
barcode.BottomMargin = 16;
barcode.LeftMargin = 16;
barcode.RightMargin = 16;
barcode.TopMargin = 16;

//Set QR Code error correction level
barcode.ECL = QRCodeECL.L;


// Set QR-Code drawing image format to PNG in C#
barcode.Format = System.Drawing.Imaging.ImageFormat.Png;

// Generate QR-Code barcode & encode to the png image in C#
barcode.drawBarcode("C://barcode-qrcode-csharp.png");

VB.NET Code for QR Code Generation in ASP.NET

' Create QR-Code barcode object in VB.NET
Dim barcode As New QRCode()

' Set QR-Code barcode value in VB.NET
barcode.CodeText = "QRCode in VB.NET"

' Set QR Code module size
barcode.X = 4

' Set QR Code quiet zone
barcode.BottomMargin = 16
barcode.LeftMargin = 16
barcode.RightMargin = 16
barcode.TopMargin = 16

'Set QR Code error correction level
barcode.ECL = QRCodeECL.L


' Set QR-Code drawing image format to PNG in VB.NET
barcode.Format = System.Drawing.Imaging.ImageFormat.Png

' Generate QR-Code barcode & encode to the png image in VB.NET
barcode.drawBarcode("C://barcode-qrcode-vbnet.png")
How to Print Barcodes in IIS using ASP.NET Barcode Generator
Apart from generating barcode images in Visual Studio developing platform, you can also generate barcode images in IIS using our ASP.NET barcoding component. Following are detailed steps to do that:
  1. Find folder barcode in the downloaded trial package.
  2. Copy cotent of folder barcode to your IIS project, eg:C:\interpub
  3. Create a new virtual directory in your IIS named "barcode", and connect it to the above barcode folder in the C:\interpub
  4. Restart your Microsoft IIS and navigate to:
    http://YourDomain:Port/barcode/qrcode.aspx?code-text=KDQRCODE&x=2&left-margin=8&right-margin=8&top-margin=8&bottom-margin=8
  5. If you want to insert this QR Code image in your aspx or html page, please pass the url to IMG tag or src value
    < img src="http://YourDomain:Port/barcode/qrcode.aspx?code-text=KDQRCODE&x=2&left-margin=8&right-margin=8&top-margin=8&bottom-margin=8" />
Note: X refers to module size, code-text refers to encodable characters.
Generate & Print Other Barcodes in ASP.NET
Barcode control for ASP.NET web application, barcode class library (DLL), is able to create many popular 1D/2D bar code symbologies, such as: