KA.Barcode Generator for .NET Suite
How to Print Code 128 in C# with Valid Data
Complete C#.NET source code to generate Code 128 images using Barcode Generator for .NET
  • Complete C#.NET source code to generate, print Code 128 images using Barcode Generator for .NET Control
  • Powerful barcode component barcode Java, barcode .NET, ASP.NET barcode developed for easy barcode creation
  • Print, Draw Code 128 linear bar codes in Windows forms, ASP.NET web applications in C#.NET
  • Simple to encode all 128 ISO/IEC 646 characters, i.e. characters 0 to 127 inclusive
  • Characters with byte values 128 to 255 may also be encoded
  • High-quality Code 128 image output for all printers and scanners/readers
  • Recongize linear & 2D barcodes using barcode Excel or ASP.NET barcode
  • Automatically calculate and add checksum digit according to latest ISO/IEC Code 128 specification
  • Quiet zones automatically added as required in Code 128 standard
KA.Barcode Generator for .NET Suite is a powerful barcode generator component SDK for easy Code 128 image generation in ASP.NET web applications, Windows Forms, C#.NET class library and Crystal Reports. This page offers detailed C# demo code for Code 128 image setting. If you want to get more C# code on Code 128 data encoding and size setting, please follow the links below:
Linear Barcode Code 128 Size Setting in Visual C#.NET
Linear Barcode Code 128 Image Setting in Visual C#.NET
Microsoft Visual Studio 2005; Visual C#.NET. How to Generate Barcodes in RDLC Using C#.NET. Download Demo Package. Download KeepAutomation Barcode...
Dll which is designed and developed for Windows forms development. It allows .NET developers, especially C#.NET developers, to add simply advanced...
Download KA.Barcode for .NET Suite to create barcodes in .NET now! Install KA.Barcode for .NET Suite SDK Library. Please unzip the downloaded trial...
Visual C#.NET. How to Generate Barcodes in Crystal Reports Using ....
more>
Code 128 Introduction
Code 128, also named as ANSI/AIM 128, ANSI/AIM Code 128, USS Code 128, Uniform Symbology Specification Code 128, Code 128 Code Set A, Code 128 Code Set B, Code 128 Code Set C, Code 128A, Code 128B, Code 128C, is a self-checking linear bar code which encodes 128 ISO/IEC 646 characters.

Valid Data

  • Code 128A: A-Z, 0-9, and seven special characters
  • Code 128B: A-Z, a-z, 0-9, and seven special characters
  • Code 128C: digit pairs from 00-99 inclusive, and three special characters

Valid Length

  • Code 128 barcode has a variable symbol length.
Code 128 Data Encoding in KA.Barcode Generator for .NET Suite

Install KA.Barcode Generator for .NET Suite into Project

  1. 1.
  2. 2.
    Add Reference: Add "KeepAutomation.Barcode.Window.dll" to your .NET WinForms project reference.
  3. 3.
    Add to Toolbox: Add BarCodeControl to your .NET Visual Studio toolbox.
Copy the following C#.NET Code onto your project to create a Code 128 barcode image
using KeepAutomation.Barcode.Bean;

BarCode code128= new BarCode();
code128.Symbology = KeepAutomation.Barcode.Symbology.Code128Auto;
code128.CodeToEncode = "Code128";
code128.X = 3;
code128.generateBarcodeToImageFile("C:/code128_csharp.png");
Stream barcode images in ASP.NET web sites & web forms application using free Visual C# .NET trial. KA.Barcode Generator for ASP.NET ....
How to Generate QR Code in VB.NET application. How to generate 2D QR Code barcode images in VB.NET, ASP.NET web applications, and windows forms. ....
Successfully. How to Generate QR Code in Java Class with Demo Code. Here is the detailed sample code to create QR Code in Java class. All ....
Code Barcode Generation functionality of KA.Barcode Generator for .NET Suite, which enables developers to efficiently print, produce QR Codes in...
This Barcode Generator control SDK library support generating ....
more>

How to Encode Alphanumeric Data for Code128A

KeepAutomation Code 128A allows you to encode all of the standard upper-case alphanumeric characters (A-Z, 0-9) and punctuation characters ( , ; < = > ? @ ) together with the control characters, i.e. characters with values from 00-95 inclusive, as defined in ISO/IEC 646, and seven special characters.
using KeepAutomation.Barcode.Bean;

BarCode code128= new BarCode();
code128. Symbology = Symbology. Code128A;
code128.CodeToEncode = "CODE128";

How to Encode Alphanumeric Data for Code128A

KeepAutomation Code 128B allows you to encode all of the standard upper-case & lower-case alphanumeric characters (A-Z, a-z, 0-9) and punctuation characters ( , ; < = > ? @ ) together with the control characters.
using KeepAutomation.Barcode.Bean;

BarCode code128= new BarCode();
code128. Symbology = Symbology. Code128B;
code128.CodeToEncode = "Code128";

How to Encode Numeric Data for Code128C

As specified in the Code 128 standard, KeepAutomation Code 128C allows you to encode the set of 100 digit pairs from 00-99 inclusive, as well as special characters. This allows numeric data to be encoded as two data digits per symbol character. Because of the encoding pattern, if you input numeric data with odd digits, a zero will be added in the end of the encoding. For example, if you input data "123" in a Code 128C, the output will be “1230”.
using KeepAutomation.Barcode.Bean;

BarCode code128= new BarCode();
code128. Symbology = Symbology. Code128C;
code128.CodeToEncode = "1234";
Please note that if you are not sure which data mode is proper for your encoding, you can simply select Code 128 Auto mode, KA.Barcode Generator for .NET Suite will automatically print valid Code 128 images according to the data you input and make necessary shift when necessary.