Our Customers
Contact Us Email: support@barcodelib.com
Home > .NET Barcode > C# Barcode Generation Guide > C#.NET UPC-A Barcode Generation Control, also supports UPC-E Linear Barcodes in C#
Download Barcode for .NET Suite Trial

UPC-A Barcode C#.NET Generation SDK

Instructions for Generating UPC-A Barcodes in .NET with C# Library
  • Integrate C#.NET UPC-A barcode generating function into easy-to-use dlls
  • Easy to generate UPC-A in .NET, ASP.NET & Console applications with C# class library
  • Able to create & print UPC-A barcode images in Crystal Reports & RDLC Reports
  • Automatically calculate and add check character for UPC-A barcodes
  • Supporting other commonly used linear barcodes, like Code 39 and GS1-128
  • Also suitable for popular 2D barcodes, like QR Code and PDF-417
  • Royalty-free and perpetual developer license for C#.NET projects
C#.NET Linear UPC-A Barcode Overview
UPC-A, short for Universal Product Code version A, is a commonly used linear barcode, especially in America. It can only encode 10 characters, i.e., digit 0-9. In general, an UPC-A barcode will encode 11 data and 1 check digit.
Guide to Generate UPC-A Images for .NET with C# Class
  1. Add downloaded C#.NET barcode generation SDK to your project reference.
  2. Add downloaded C#.NET barcode generation SDK to your Toolbox item.
  3. You may generate UPC-A barcode with following free C# sample codes.
     BarcodeLib.Barcode.Linear upca = new BarcodeLib.Barcode.Linear();
upca.Type = BarcodeType.UPCA;
upca.Data = "12345678901";

upca.BarColor = System.Drawing.Color.Blue;
upca.BarWidth = 1;
upca.LeftMargin = 8;
upca.RightMargin = 8;

// More UPC-A barcode settings here, like image format, font, data text style etc.

// Save barcode image into your system

// Encode UPC-A barcode & output to byte array
byte[] barcodeInBytes = upca.drawBarcodeAsBytes();

// Draw UPC-A barcode to Graphics object
Graphics graphics = ...;

// Create UPC-A barcode and output to HttpResponse object
HttpResponse response = ...;

// Encode UPC-A barcode and output to Stream object
Stream stream = ...;
Above Free UPC-A sample codes are written in Visual C# 2005
Guide to Create UPC-A Barcodes in C# ASP.NET Web Project
  1. Add Barcodelib.Barcode.ASP.NET.dll to your web project.
  2. Add Barcodelib.Barcode.ASP.NET.dll to Toolbox.
  3. Open the folder barcode in the downloaded trial package and copy files "linear.aspx", "linear.aspx.cs" to your project folder.
  4. Drag LinearASPNET from the Toolbox and drop it on the split part of your aspx page. Then you may see a Code 128 image tag on the form.
  5. Click the produced barcode image and change barcode type to UPC-A in the Properties Window or generate an UPC-A barcode with above C# sample codes for UPC-A barcoding.
Guide to Generate UPC-A Barcodes in C#.NET WinForms Project
  1. Add BarcodeLib.Barcode.WinForms.dll from the trial package to your WinForms Project.
  2. Add BarcodeLib.Barcode.WinForms.dll to your Visual Studio Toolbox.
  3. Drag LinearWinForm to your windows form and click generated image. Then, adjust its barcode type to UPC-A in the Properties Window or create an UPC-A image with above free C# codes for UPC-A barcoding.
Barcode Images Supported by C#.NET Barcode Generator DLL
C# 1D Barcode Generation:
C# 2D Barcode Generation:
Suitable Linear Barcodes: 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.
Suitable 2D Barcodes: Data Matrix, PDF 417, QR Code.

Provides High Quality Barcode .NET Lib, Barcode .NET WinForms Lib, Barcode ASP.NET Lib, Barcode C# Lib, Barcode VB.NET Lib, UPC-A C# Lib, UPC-A VB.NET Lib, UPC-A Barcode Library DLL for .NET, ASP.NET, .NET WinForms, .NET SSRS, .NET Crystal Reports, and .NET RDLC Reports.