Java Barcode Generator, .NET Barcode Generator for C#, ASP.NET, VB.NET
HOME PURCHASE SITEMAP COMPANY

Home > .NET Barcode > Barcode Generation Guide > ASP.NET Barcode Generation Guide

Download C#, .NET, VB.NET Barcode

ASP.NET Barcode Generation Guide

Generating Linear & 2D Barcodes in ASP.NET Web Projects


  • Easy & Simple to generate barcodes in ASP.NET web projects
  • Generate high quality JPEG, GIF & PNG barcode images
  • 100% build in managed C#
  • Mature asp.net barcode component since 2003
  • Compatible with latest barcode symbology standards
  • Create linear barcodes, including Code39, Code128, GS1-128, Interleaved 2 of 5, EAN / UPC
  • Create 2d barcodes, including Data Matrix, PDF-417, & QR-Code
  • Royalty-free and perpetual developer license


This document is about how you can do with .NET Barcode Generator component to generate barcodes in your ASP.NET class, ASPX design pages.



ASP.NET Barcode Generator - Supporting Symbologies



ASP.NET Barcode - Barcodes Generation through ASP.NET Class.

Install:

  • Add BarcodeLib.Barcode.dll component to your asp.net website reference.

Implement:

The following C#.net code illustrates how to generate a Code-128 barcode image in an ASP.NET C# class

	BarcodeLib.Barcode.Linear.Linear barcode = new BarcodeLib.Barcode.Linear.Linear();
	barcode.Type = BarcodeType.CODE128;
	barcode.Data = "CODE128";
	// other barcode settings.
	                        
	// save barcode image into your system
	barcode.drawBarcode("c:/barcode.png");

 

ASP.NET Barcode - Barcode Generation without Web Controller
  • Under downloaded trial package, copy barcode folder to your IIS folder, e.g. C:\Inetpub.
  • Create a new virtual directory in IIS, named barcode, and link to the above "barcode" folder.
  • Restart IIS.
  • To test your installation, open your web browser and navigate to
    http://YourDomain:Port/barcode/linear.aspx?Type=CODE39&Data=12345678
  • 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=CODE39&Data=12345678" />

    or for Data Matrix
    <img src="http://YourDomain:port/barcode/datamatrix.aspx?Data=12345678" />

    or for PDF417
    <img src="http://YourDomain:port/barcode/pdf417.aspx?Data=12345678" />

    or for QRCode
    <img src="http://YourDomain:port/barcode/qrcode.aspx?Data=12345678" />


    Using this method, it will not generate any barcode images in your IIS server side.
 

ASP.NET Barcode - Barcodes Generation through ASP.NET Web Controller
  1. Install .NET Barcode Controller to your ASP.NET project.
    1. Add Reference BarcodeLib.Barcode.dll to your project. Do not copy the dll to the bin directory, Visual Studio will do so, during project compilation time.
    2. Copy linear.aspx file to your web application.
  2. Add barcode library to your Visual Studio Toolbox.
    1. Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
    2. Right click Toolbox, click menu Choose Items...
    3. Goto .NET Framework Components tab.
    4. If no BarcodeLib component found, click Browse... button and select BarcodeLib.Barcode.dll file.
    5. Then sort "Namespace" column, you will find 8 components from BarcodeLib.Barcode.
    6. Check component DataMatrixWebForm, and its namespace is BarcodeLib.Barcode.DataMatrix
    7. Check component LinearWebForm, and its namespace is BarcodeLib.Barcode.Linear
    8. Check component PDF417WebForm, and its namespace is BarcodeLib.Barcode.PDF417
    9. Check component QRCodeWebForm, and its namespace is BarcodeLib.Barcode.QRCode

      do not select WinForm controls, which are for Windows Forms.
    10. Click "OK" button, you will find four components under "General": LinearWebForm, DataMatrixWebForm, PDF417WebForm, QRCodeWebForm.
  3. Go to "barcode" folder in the trial package, copy files "linear.aspx", "datamatrix.aspx", "pdf417.aspx", "qrcode.aspx" to the same folder as your aspx page, which will generate barcodes.
  4. You can drag LinearWebForm 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








   Copyright 2009 BarcodeLib.com. ASP.NET Barcode, Barcode ASP.NET, ASP.NET Barcode Generator, Barcode Generation in ASP.NET. All rights reserved.