Barcode for ASP.NET > Generate Barcode in ASP.NET

How to Generate Barcodes in ASP.NET

Create Linear & 2D Barcode Images in ASP.NET Web Applications, IIS, C# & VB.NET
  • Mature ASP.NET barcode component sdk dll written in C# with full integration into .NET applications
  • Compatible with barcode specifications to ensure scannability for generated barcodes
  • Easily stream barcode images in ASP.NET web sites, web form, and Microsoft IIS
  • Easy to generate 1d & 2d barcode images using free C# and VB.NET class library
  • Support multiple linear barcode types in ASP.NET project, like Code 128, EAN/UPC, GS1-128, etc
  • Able to adjust resolution to print good-quality ASP.NET web barcode images suitable for all printers
  • Provide ASP.NET barcoding sample code for setting barcode width, checksum, quiet zones, etc
  • Support major browsers, like Chrome, Firefox, Internet Explorer, Opera, etc
Download Free KA.Barcode for ASP.NET Evaluation
Perpetual Evaluation
You are able to use this free evaluation/trial version for an unlimited period of time.
Limits of Evaluation
As barcode images created with this free evaluation/trial version have a "KA Barcode" watermark, business implementations of this evaluation/trial version are forbidden. The applicable licenses bought from our website can be used for commercial applications.
How to Generate Barcode Image in ASP.NET Web Form
To create barcode in ASP.NET web forms, you only need to add this barcode library to Visual Studio .NET toolbox. Then you can simply drag and drop the control to your web form for barcode generation. Here's how:
  1. Open Visual Studio and create a new ASP.NET application project;
  2. Unzip the downloaded package and copy "barcode.aspx" and "barcode.aspx.cs" to your project;
  3. Right-click in the Toolbox, select "Choose Items..." > "Browse...", and choose "KeepAutomation.Barcode.Web.dll";
  4. Drag and drop "BarCodeControl" in Toolbox to your ASPX web forms;
  5. Run the project to generate the barcode image. You can customize this barcode within property panel.
How to Create Barcode in ASP.NET Using C# & VB.NET
If you want to create barcodes through programming, you can opt for Visual C# or VB.NET class using this ASP.NET barcode generator. Please follow the steps for installation and copy the sample code for barcoding.
  1. Firstly add our "KeepAutomation.Barcode.Web.dll" to your ASP.NET Web project reference.
  2. Next, copy "barcode.aspx" and "barcode.aspx.cs" from "barcode" folder of the unzipped trial package into your new project folder.
  3. Then, drag and drop BarCodeControl into the aspx page where your barcode image will be generated.
  4. And then enter your C# or VB.NET Class by clicking "View Code" in "Default.aspx".
  5. Now, copy following sample code into "Default.aspx.cs". Of course, you can edit your required codes.
  6. After that, run your project and you can find the generated barcode image.
C# Sample code
     this.BarCodeControl1.Symbology = KeepAutomation.Barcode.Symbology.Code39;
this.BarCodeControl1.CodeToEncode = "7412531";
this.BarCodeControl1.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel;
this.BarCodeControl1.BarCodeWidth = 1;
this.BarCodeControl1.BarCodeHeight = 60;

VB Sample code
     Me.BarCodeControl1.Symbology = KeepAutomation.Barcode.Symbology.Code39
Me.BarCodeControl1.CodeToEncode = "7412531"
Me.BarCodeControl1.BarcodeUnit = KeepAutomation.Barcode.BarcodeUnit.Pixel
Me.BarCodeControl1.BarCodeWidth = 1
Me.BarCodeControl1.BarCodeHeight = 60

How to Add Barcode in Microsoft Internet Information Services
Users can opt for barcoding through Microsoft IIS, which can efficiently create barcodes using building ASP.NET web control. Barcode generation is easy through file copy, virtual directory and URL inputting. Here are the simple steps.
  1. Copy "barcode" folder and its contents in the downloaded package to your IIS.
  2. Create a new virtual directory named "barcode" and then restart IIS.
  3. Navigate to "http://YourDomain:port/barcode/barcode.aspx?code-to-encode=123456&symbology=4"
  4. To insert barcodes in html or aspx pages, just need to add image tag into target pages:
    <img src="http://YourDomain:port/barcode/barcode.aspx?code-to-encode=3939&symbology=4"/>
  5. You can configure your created barcode images in the url with http attributes, and we provide detailed information as below table. For more settings, view barcode properties here.
HTTP Attribute (Linear & Matrix Barcodes)
Codabar = 0 Code 11 = 1 Code 2 of 5 = 2 Interleaved 2 of 5 = 3
Code 39 = 4 Code39 ex = 5 Code 93 = 6 Code128Auto = 7
Code128A = 8 Code128B = 9 Code128C = 10 EAN128 = 11
EAN8 = 12 EAN8Sup2 = 13 EAN8Sup5 = 14 EAN13 = 15
EAN13Sup2 = 16 EAN13Sup5 = 17 ISBN = 18 ISBNSup2 = 19
ISBNSup5 = 20 ISSN = 21 ISSNSup2 = 22 ISSNSup5 = 23
ITF-14 = 24 Identcode = 25 Leitcode = 26 MSI = 27
MSI10 = 28 MSI11 = 29 MSI1010 = 30 MSI1110 = 31
IntelligentMail = 32 Planet = 33 Postnet = 34 RM4SCC = 35
UPC-A = 36 UPCASup2 = 37 UPCASup5 = 38 UPC-E = 39
UPCESup2 = 40 UPCESup5 = 41 DataMatrix = 101 PDF-417 = 102
QRCode = 103
Download Free TrialBarcode in ASP.NETBarcode in .NET ClassBarcode in IISUsing C#Using VB.NETData Matrix for ASP.NETPDF417 for ASP.NETQR Code for ASP.NETmoreCodabar for ASP.NETCode 39 for ASP.NETCode 128 for ASP.NETEAN-8 for ASP.NETEAN-13 for ASP.NETEAN 128 for ASP.NETIntelligent Mail for ASP.NETInterleaved 2 of 5 for ASP.NETISBN for ASP.NETITF-14 for ASP.NETRM4SCC for ASP.NETUPC-A for ASP.NETUPC-E for ASP.NETmore
KeepAutomation provides complete barcode automation solutions for barcode Business Application, barcode Enterprise Developement Project, and barcode mobile applications. We recommend the customers use high quality ASP.NET html5 document viewer, c# pdf sdk, C# merge PDF files, Split PDF in C#, C# View, edit PDF online , C# Convert PDF to Tiff, C# Convert PDF to text, txt, .net imaging sdk, C# PDF metadata edit from