Our Customers
Contact Us Email: support@barcodelib.com
Home > ASP.NET Barcode> ASP.NET Barcode Generation Guide > Code 128 ASP.NET Barcode Generation Guide
Download Barcode for ASP.NET Trial

ASP.NET Code 128 Barcode Generator Control

How to Add Code 128 Barcode Images in ASP.NET Web Application / Website & IIS
  • Use a fully compiled ASP.NET Barcode Generator DLL for Code 128 linear barcode creation
  • Entirely compatible with .NET IDEs, such as Visual Studio 2005/2008/2010
  • Easy to generate and stream Code 128 linear barcode images to ASP.NET web services
  • Easy to encode and add high print-quality Code 128 images to ASP.NET website projects
  • Easy to draw 1D Code 128 barcode images on Microsoft Internet Information Services (IIS)
  • Achieve fast & high-quality Code 128 encoding for ASP.NET using C# / VB.NET Class Lib
  • Generate other main linear barcode types, like Code 2 of 5, Code 39, UPC / EAN barcodes, etc
  • Generate commonly used 2D barcode types, like Data Matrix, PDF-417, QR-Code, etc
ASP.NET Code 128 Linear Barcode Introduction
Code 128 barcode is a very high-density linear (1D) barcode types. Thus, it has been implemented worldwide in many applications where a relatively large amount of data must be encoded in a relatively small amount of space.
Barcode Compatibility: All Code 128 barcode images created by our ASP.NET Barcoding Library DLL comply with ISO/IEC 15417 (Second edition 2007-06-01) barcode specification. So, all these Code 128 linear barcode images can be read & scan by all high or low-resolution barcode recognition tools.
Encodable Characters:
  • Code Set A: Standard upper case U.S. alphanumeric keyboard characters and punctuation characters together with the control characters, (i.e. characters with ASCII values from 0 to 95 inclusive), and seven special characters.
  • Code Set B: Standard upper case alphanumeric keyboard characters and punctuation characters together with the lower case alphabetic characters (i.e. characters with ASCII values from 32 to 127 inclusive), and seven special characters.
  • Code Set C: The set of 100 digit pairs from 00 to 99 inclusive, as well as three special characters. This allows numeric data to be encoded as two data digits per symbol character, at effectively twice the density of standard data.
Special Characters:
  • The last seven characters of Code Sets A and B: Character values 96 - 102
  • The last three characters of Code Set C: Character values 100 - 102
To know more, please see .NET Code 128 Introduction.
How to Integrate Code 128 ASP.NET Barcode Generator SDK?
  1. Add ASP.NET bar coding library dll to your ASP.NET project reference.
    • Click "Add Reference..." in "Solution Explorer".
    • Click "Browse" to find Barcodelib.Barcode.ASP.NET.dll in the unzipped file, and click "OK" button.
  2. Add ASP.NET bar coding library dll to Visual Studio Toolbox.
    • Right click in Toolbox and select "Choose Items...".
    • In the pop-up window, click "Browse..." to locate the dll Barcodelib.Barcode.ASP.NET.dll.
    • Click "OK" and now four items are listed in VS Toolbox: LinearASPNET, DataMatrixASPNET, QRCodeASPNET, and PDF417ASPNET.

How to Create Code 128 Barcode in ASP.NET web site & Microsoft IIS?
We provide two methods for Code 128 barcode generation in ASP.NET web site & Microsoft IIS.
  1. Generate linear barcode Code 128 image using Buildin ASP.NET Barcode Application.
    • Download & unzip the trial, and copy barcode folder and its contents to your IIS folder, eg. C:\inetpub.
    • Create a new virtual directory in your IIS named "barcode", and connect it to the above "barcode" folder pasted in inetpub.
    • Restart your Microsoft IIS and navigate to: http://YourDomain:Port/barcode/linear.aspx?Type=2&Data=ASPNETCode128&LeftMargin=11&RightMargin=11
      To make further adjustment for the Code 128 image, please view web stream URL parameters for Code 128 here: .NET Code 128 Barcode Property Settings
    • If you want to add this Code 128 barcode image to your aspx or html page, please pass the url to IMG tag or src value.
      <img src=http://YourDomain:Port/barcode/linear.aspx?Type=2&Data=ASPNETCode128&LeftMargin=11&RightMargin=11 />
      This method will not generate any barcode images in your IIS server side.
  2. Generate linear barcode Code 128 timage using ASP.NET web form controller.
    • Intall ASP.NET barcode controller to your .NET project by adding reference.
    • Add ASP.NET barcode library dll to your Visual Studio toolbox.
    • Open barcode in your unzipped trial package, and copy files "linear.aspx", "linear.aspx.cs" to the aspx page where you will be generating Code 128 images.
    • Now drag LinearASPNET to your ASP.NET web site, and change Code 128 settings if necessary in the Properties window.
    • Run the project to view the encoded Code 128 barcode on your aspx page.
How to Create Code 128 Image in ASP.NET Using C# / VB.NET Class?
Please use the following free C# and VB.NET demo code to generate Code 128 images in .NET class library.
     BarcodeLib.Barcode.Linear code128 = new BarcodeLib.Barcode.Linear();
code128.Type = BarcodeType.CODE128;
code128.Data = "ASPNETCode128";

code128.UOM = UnitOfMeasure.PIXEL;
code128.BarWidth = 1;
code128.BarHeight = 80;
code128.LeftMargin = 10;
code128.RightMargin = 10;
code128.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;

// Save Code 128 barcode image into your system
code128.drawBarcode("c:/csharp-code128.jpeg");

Above Code 128 sample code is written in Visual C# 2005 View More Code 128 C#.NET Demo Code
     Dim code128 As New BarcodeLib.Barcode.Linear()
code128.Type = BarcodeType.CODE128
code128.Data = "ASPNETCode128"

code128.UOM = UnitOfMeasure.PIXEL
code128.BarWidth = 1
code128.BarHeight = 80
code128.LeftMargin = 10
code128.RightMargin = 10
code128.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg

' Save Code 128 barcode image into your system
code128.drawBarcode("c:/vbnet-code128.jpeg")
Above Code 128 sample code is written in Visual Basic View More Code 128 VB.NET Demo Code
Code 128 ASP.NET Barcode Generator DLL Supported Barcode Types
Support Linear Barcodes:
Support Matrix Barcodes:
Code 128 ASP.NET Barcode Control Supported Linear Bar Codes: Codabar, Code 11, Code 2 of 5, Code 39, Code 93, Code 128, EAN 8, EAN 13, GS1-128/EAN-128, Interleaved 2 of 5, ITF14 (UPC Shipping Container Symbol), MSI Plessey, Onecode, Planet, Postnet, RM4SCC (British Royal Mail 4-State Customer Barcode), UPC-A, UPC-E.
Code 128 ASP.NET Barcode Control Supported 2D Bar Codes: Data Matrix, PDF 417, QR Code.



Other Related Barcode Generation Articles

ASP.NET C# & VB.NET Barcode Generation Guide
Other .NET Barcoding Tutorial & FAQ