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 Encode Code 128 Data in ASP.NET
BusinessRefinery.com ASP.NET Code 128 Barcode DLL is an ASP.NET barcode generation control that enables .NET developers to create, manage and manipulate Code 128 barcodes in ASP.NET Web Forms as well as in Internet Information Service (IIS).
Absolutely, this products I generates Code 128 barcodes compatible with its barcode specification in ISO - ISO / IEC 15417 (2nd edition 2007-06-01). This article explains how to encode Code 128 valid characters in ASP.NET, IIS; other Code 128 barcode related setting, please see:
Code 128 Data Related Properties

Symbology

Barcode Generator for ASP.NET provides Symbology class for users, if they want to encode Code 128 barcode with Subset A, Subset B and Subset C.

Code 128 Barcode encodes:
  • Code128Auto: encodes all encodable characters of Code 128
  • Code128A: encodes all of the standard upper case alphanumeric characters and punctuation characters together with the control characters
  • Code128B: all of the standard upper case alphanumeric characters and punctuation characters together with the lower case alphabetic characters
  • Code128C: the set of 100 digit pairs from 00 to 99 inclusive, as well as three special characters

Code

Barcode Generator for ASP.NET provides Code class for users, if they want to manipulate Code 128 barcode length.

ProcessTilde

Barcode Generator for ASP.NET provides ProcessTilde class for users, if they want to encode special character for Code 128 using "~".
  • 1-byte character: ~0dd/~1dd/~2dd (character value from 000 ~ 255); ASCII character '~' is presented by ~126
    Strings from "~256" to "~299" are unused
  • 2-byte character (Unicode): ~6ddddd (character value from 00000 ~ 65535)
    Strings from "~665536" to "~699999" are unused

Human-readable Text

Barcode Generator for ASP.NET provides AddChecksum class for users to automatically add a check digit for generated Code 128 barcode.

Barcode Generator for ASP.NET provides Textfont class for users, if they want to show human-readable text with customized text style under generated Code 128 symbols.
Customize Code 128 Barcode Data 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
Encode Code 128 Barcode Data 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=0123456789&symbology=8&display-text=true;
  5. Then a Code 128 occurs.
Encode Code 128 Barcode Data in ASP.NET Using C#, VB.NET Class
using BusinessRefinery.Barcode;

Linear barcode = new Linear();
barcode.Symbology = Symbology.CODE128;

// Encode Code 128 barcode with tilde charcater "~"
barcode.ProcessTilde= true;
barcode.Code = "~648918";

// Display Code 128 barcode human-readable text with customized font
style

barcode.DisplayText = true;
barcode.TextFont = new Font("Arial", 11.0f, FontStyle.Bold);
barcode.drawBarcode2ImageFile("c:/code-128-csharp.gif");
Dim barcode As BusinessRefinery.Barcode.Linear = 
New BusinessRefinery.Barcode.Linear()

' Encode Code 128 barcode with Subset C
barcode.Symbology = BusinessRefinery.Barcode.Symbology.CODE128C

' Encode Code 128 barcode with multiple length
barcode.Code = "648918"

' Display Code 128 barcode human-readable text with customized font
style

barcode.DisplayText = true
barcode.TextFont = new Font("Arial", 11.0f, FontStyle.Bold)
barcode.drawBarcode2ImageFile("c:/code-128-vb-net.gif")
Encode Code 128 Barcode Data 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=0123456789&symbology=8&display-text=true.