Our Customers
Contact Us Email: support@barcodelib.com
Home > ASP.NET Barcode > ASP.NET Barcode Generation Guide - Using ASP.NET Barcode Library DLL for Barcode Image Generation
Download Barcode for ASP.NET Trial

ASP.NET Barcode Generation Guide

How to Generate Linear & 2D Barcodes in ASP.NET Web Projects
  • Support complete integration and fast barcodes generation in ASP.NET web applications
  • Encode high print quality barcode images in JPEG, GIF or PNG format for ASP.NET web services
  • Fully build in managed C#, providing free C# & VB.NET sample codes
  • Top-notch and competitive asp.net barcode component dll on the market
  • Compatible with latest 1D and 2D barcode symbology standards
  • Create linear barcodes for ASP.NET web, like Code39, Code128, GS1-128, Interleaved 2 of 5, EAN / UPC
  • Create 2d barcode images for ASP.NET web, like Data Matrix, PDF-417, & QR-Code
  • Fulfill development needs by providing royalty-free developer license for ASP.NET Web Barcode Control DLL
This document is about how you can do with ASP.NET Barcode Generator component to generate barcodes in your ASP.NET class, ASPX design pages applications.
ASP.NET Barcode Generator DLL - Supporting Symbologies
All Linear / 1D Barcodes:
All Matrix / 2D Barcodes:
ASP.NET Barcode Generates 2D (Matrix) Barcode Symbologies: Data Matrix, PDF417, QR Code.
ASP.NET Barcode Library DLL - Barcodes Generation through ASP.NET Class

Install

  1. Add Reference BarcodeLib.Barcode.ASP.NET.dll component to your asp.net website reference.

Implement

The following free C#.net code illustrates how to generate a Code-128 barcode image in an ASP.NET C# class
     BarcodeLib.Barcode.Linear barcode = new BarcodeLib.Barcode.Linear();
barcode.Type = BarcodeType.CODE128;
barcode.Data = "CODE128";
// other barcode settings.

// save barcode image into your system
barcode.drawBarcode("c:/barcode.png");
For ASP.NET VB barcode generation, View ASP.NET Barcode in VB.NET Class.
ASP.NET Barcode Control - Barcode Generation without Web Controller
  1. Under downloaded trial package, copy barcode folder to your IIS folder, e.g. C:\Inetpub.
  2. Create a new virtual directory in IIS, named barcode, and link to the above "barcode" folder.
  3. Restart Microsoft IIS.
  4. To test your installation, open your web browser and navigate to:
    http://YourDomain:Port/barcode/linear.aspx?Type=7&Data=CODE39-123456789012
  5. To create barcode image in your aspx or html page, you need pass the url to IMG tag src value.
    For linear barcode
    <img src="http://YourDomain:port/barcode/linear.aspx?Type=7&Data=CODE39-123456789012" />
    or for Data Matrix
    <img src="http://YourDomain:port/barcode/datamatrix.aspx?Data=BarcodeLib12345678&ModuleSize=4&LeftMargin=8&RightMargin=8&TopMargin=8&BottomMargin=8" />
    or for PDF417
    <img src="http://YourDomain:port/barcode/pdf417.aspx?Data=123456789&ModuleSize=3&LeftMargin=6&RightMargin=6&TopMargin=6&BottomMargin=6" />
    or for QRCode
    <img src="http://YourDomain:port/barcode/qrcode.aspx?Data=0123456789&ModuleSize=3&LeftMargin=12&RightMargin=12&TopMargin=12&BottomMargin=12" />
    Using this method, it will not generate any barcode images in your IIS server side.
ASP.NET Barcode Control - Barcodes Generation through ASP.NET Web Controller
  1. Install ASP.NET Barcode Controller to your ASP.NET project.
    • Add Reference BarcodeLib.Barcode.ASP.NET.dll to your project.
      There's no need to copy barcoding dll to your project bin folder because Visual Studio will do it for you during project compilation time.
  2. Add barcode library to your Visual Studio Toolbox.
    • Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
    • Right click Toolbox, click menu Choose Items...
    • Goto .NET Framework Components tab.
    • If no BarcodeLib component found, click Browse... button and select BarcodeLib.Barcode.ASP.NET.dll file.
    • Then sort "Namespace" column, you will find 4 components from BarcodeLib.Barcode.
    • Check component LinearASPNET, and its namespace is BarcodeLib.Barcode.
    • Check component DataMatrixASPNET, and its namespace is BarcodeLib.Barcode.
    • Check component PDF417ASPNET, and its namespace is BarcodeLib.Barcode.
    • Check component QRCodeASPNET, and its namespace is BarcodeLib.Barcode.
    • Click "OK" button, you will find four components under "General": LinearASPNET, DataMatrixASPNET, PDF417ASPNET, QRCodeASPNET.
  3. Go to "barcode" folder in the trial package, copy files "linear.aspx", "linear.aspx.cs", "datamatrix.aspx", "datamatrix.aspx.cs", "pdf417.aspx", "pdf417.aspx.cs", "qrcode.aspx", "qrcode.aspx.cs" to the same folder as your aspx page, which will generate barcodes.
  4. You can drag LinearASPNET on your aspx page, change barcode setting through properties window.
  5. Run the project, you will find barcode images generated in your aspx pages.
Other Related Articles