Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode > C# Barcode Generation Guide > C#.NET USPS Intelligent Mail (Onecode) Barcode Generator Control
Download Barcode for .NET Suite Trial

OneCode Barcode Generator in C#.NET class

How to Generate & Print Intelligient Mail Linear Barcode in C#.NET Library
  • Mature barcode generator for C#.NET, being used for over 10 years
  • Built 100% in C#, support programming languages like C# & VB.NET
  • Generate USPS OneCode barcode in Visual C# WinForms .NET applications
  • Print & create ASP.NET linear Intelligent Mail barcode using C# DLL lib
  • Also support other linear & 2d barcode encoding, like QR Code, Data Matrix and EAN, UPC
  • Provide royalty-free developer license for C#.NET project barcoding developers
About C#.NET Linear Intelligent Mail Barcode
OneCode is a linear barcode. It is sometimes called Intelligent Mail barcode, USPS4CB or 4-State Customer Barcode. This numeric-only barcode symbology can encode 20-digit tracking code and 0-, 5-, 9- or 11-digit routing code. OneCode is used in the United State Postal Services.
Method to Generate Intelligent Mail Barcode in Using C#
  1. Add our C#.NET barcode generator dll to your project reference.
  2. Add the same C#.NET barcode generator dll to your Toolbox item.
  3. Now, you could generate Intelligent Mail barcode using following C# demo codes.
     BarcodeLib.Barcode.Linear onecode = new BarcodeLib.Barcode.Linear();
onecode.Type = BarcodeType.ONECODE ;
onecode.Data = "12345678901234567890";

onecode.BarWidth = 3;
onecode.LeftMargin = 7;
onecode.RightMargin = 7;

// You could also adjust other settings of OneCode, like image format, rotate, text font etc.

// Save OneCode barcode image into your system

// Create OneCode barcode & output to byte array
byte[] barcodeInBytes = onecode.drawBarcodeAsBytes();

// Create OneCode barcode to Graphics object
Graphics graphics = ...;

// Create OneCode barcode and output to HttpResponse object
HttpResponse response = ...;

// Encode created OneCode barcode to Stream object
Stream stream = ...;
Above Free Onecode sample codes are built in Visual C# 2005
Method to Encode Intelligent Mail Image in C# ASP.NET Program
  1. Add "Barcodelib.Barcode.ASP.NET.dll" to your web project or VS Toolbox.
  2. Open the folder "barcode" and copy files "linear.aspx" & "linear.aspx.cs" to your web application folder.
  3. Drag "LinearASPNET" from the Toolbox and drop it on your aspx page.
  4. Change barcode type to OneCode in the Properties Window or generate OneCode barcode with Intelligent Mail C# Creation Code.
If you want to generate Intelligent Mail in IIS application, please refer to Intelligent Mail generation in IIS.
Method to Print OneCode Barcodes in C# WinForms Program
  1. Add "BarcodeLib.Barcode.WinForms.dll" to your project reference or Visual Studio Toolbox.
  2. Drag "LinearWinForm" to your Windows Form.
  3. Adjust barcode type to OneCode in the Properties Window or create OneCode image with above Intelligent Mail C# Creation Code.
C#.NET OneCode Barcode Generator Supported Barcode Types
C# 1D Barcode Generation:
C# 2D Barcode Generation:
The below linear barcodes can all be generated by our C#.NET barcode generator library: Codabar, Code 11, Code 2 of 5, Code 39, Code 93, EAN-8, EAN-13, Interleaved 2 of 5, ITF-14 (UPC Shipping Container Symbol), Code 128, EAN 128/GS1 128, MSI Plessey, Intelligent Mail, Planet, Postnet, RM4SCC (British Royal Mail), UPC-A, UPC-E.
The below 2d barcodes can all be generated by our C#.NET barcode generator library: Data Matrix, PDF 417, QR Code.

Provides High Quality Barcode .NET, Barcode ASP.NET, Barcode C#, Barcode VB.NET, Barcode .NET Windows Forms, OneCode .NET, OneCode C#, OneCode VB.NET, OneCode ASP.NET, Intelligent Mail (OneCode) Barcode Libraries for Windows Forms, SSRS, Crystal Reports, and RDLC Reports.