BizCode Barcode Generator for ASP.NET
The most professional barcode solutions for Microsoft ASP.NET
Quick Overviews
  • Barcode creating class library
  • Support ASP.NET IDEs & IIS
  • Easy to use & integrate
  • Dynamic barcodes support
  • High-usability controls provided
How to Generate EAN-13 images in ASP.NET
ASP.NET EAN-13 Barcode Generator DLL provides a unique and robust solution for generation EAN-13, EAN-13+2, EAN-12+5 Barcodes onto your ASP.NET web applications with programming language - Visual C# or VB.NET, or various HTTP parameters.
This article gives a complete tutorial for EAN-13 image setting in ASP.NET; for more information, please go to:
EAN-13 Image Related Properties

Supplementary Barcode

Barcode Generator for ASP.NET provides Supplement Code class for users, if they want to add EAN-2 or EAN-5 barcode on EAN-13 barcode.

Barcode Resolution

Barcode Generator for ASP.NET provides Resolution class for users, if they want to set the EAN-13 barcode images resolution in DPI according to their custom settings.

Barcode Rotation

Barcode Generator for ASP.NET provides Rotate class for users, if they want to rotate their EAN-13 barcode images into any angle of 0, 90, 180 and 270 degrees.

Image Formats

Barcode Generator for ASP.NET provides ImageFormat class for users to save the barcode images to most of the popular image formats, such as Png, Jpeg/Jpg, Gif, Tiff, Bmp, etc.

ASP.NET Graphic Objects

Barcode Generator for ASP.NET provides DrawBarcode method for users, if they want to save EAN-13 barcode images into ASP.NET Graphics, Stream and Bitmap objects.
Customize EAN-13 Barcode Images in ASP.NET & IIS
Be sure that you have installed those following programs onto your computers:
  • Microsoft .NET Framework 2.0/3.0/4.0
  • Microsoft Visual Studio 2005/2008/2010 (Express, Professional & Standard Edition)
  • Microsoft Internet Information Service (IIS)
  • Barcode Generator for ASP.NET installed
Customize EAN-13 Barcode Images in ASP.NET Web Forms Using BarcodeControl
  1. Add ASP.NE Barcode Control onto your .NET Visual Studio Toolbox;
  2. Drag and drop the WebLinearBarcode control into the Forms;
  3. Run the website and you will see a barcode image generated;
  4. Go to Address bar and change your URL with following one: http://localhost/br_barcode/linear.aspx?code=012345678901&symbology=15&rotate=0&resolution=96
  5. Then an EAN-13 with customized image occurs.
Customize EAN-13 Barcode Images in ASP.NET Using C#, VB.NET class
using BusinessRefinery.Barcode;

Linear barcode = new Linear();

// Add EAN-2 barcode for EAN-13
barcode.Symbology = Symbology.EAN13_2;
barcode.Code = "0123456789012";
barcode.SupplementCode = "12";
barcode.SupplementHeight = 0.4;
barcode.SupplementSpace = 20;

// Change EAN-13 resolution in DPI
barcode.Resolution = 104;

// Rotate EAN-13 barcode image
barcode.Rotate = Rotate.Rotate180;

// Save EAN-13 in multiple image formats
barcode.Format = ImageFormat.Gif;
barcode.drawBarcode2ImageFile("c:/ean-13-csharp.gif");

// Save EAN-13 barcode in ASP.NET objects
public void drawBarcode2ImageFile(string filename);
public void drawBarcode2Stream(Stream fileStream);
public byte[] drawBarcodeAsBytes();
public Bitmap drawBarcodeOnBitmap();
public void drawBarcodeOnGraphics(Graphics graphics);
Dim barcode As BusinessRefinery.Barcode.Linear = 
New BusinessRefinery.Barcode.Linear()

' Add EAN-2 barcode for EAN-13
barcode.Symbology = BusinessRefinery.Barcode.Symbology.EAN13_2
barcode.Code = "0123456789012"
barcode.SupplementCode = "12"
barcode.SupplementHeight = 0.4
barcode.SupplementSpace = 20

' Change EAN-13 resolution in DPI
barcode.Resolution = 104

' Rotate EAN-13 barcode image
barcode.Rotate = Rotate.Rotate180

' Save EAN-13 in multiple image formats
barcode.Format = ImageFormat.Gif
barcode.drawBarcode2ImageFile("c:/ean-13-vb-net.gif")

' Save EAN-13 barcode in ASP.NET objects
Public Sub drawBarcode2Stream(ByVal fileStream As System.IO.Stream)
Public Sub drawBarcodeOnGraphics(ByVal graphics As
System.Drawing.Graphics)
Public Function drawBarcodeAsBytes() As Byte()
Public Function drawBarcodeOnBitmap() As System.Drawing.Bitmap
Customize EAN-13 Barcode Images in Internet Information Service (IIS)
  1. Download Barcode Generator for ASP.NET and unzip;
  2. Copy the whole barcode fold and contents into IIS and create a new virtual directory called "br_barcode";
  3. Restart IIS, navigate to
    http://localhost/br_barcode/linear.aspx?code=012345678901&symbology=15&rotate=0&resolution=96;
  4. Add an image tag <img> into the web page to create EAN-13 barcode image in html or aspx pages, e.g.
    <img src="http://localhost/br_barcode/linear.aspx?code=012345678901&symbology=15&rotate=0&resolution=96"/>