ASP.NET EAN-13 Generator Library SDK

Integration & Developer Guide to generate EAN-13 barcodes in ASP.NET Web Forms

Generate barcode EAN-13 images in Visual ASP.NET web application with complete sample .NET source code

  • Generate, create EAN-13 in Visual ASP.NET applications
  • Easy to install & integrate barcode EAN-13 generation library SDK into ASP.NET developments
  • Generate industry standard linear, 2d barcode types includingASP.NET QR Code, ASP.NET Data Matrix, ASP.NET EAN-128, ASP.NET EAN-8
  • Generate EAN-13 images in ASP.NET class
  • Create barcode EAN-13 in ASP.NET webform application
  • Draw & print EAN-13 in SQL Server Reporting Service (SSRS) & Crystal Reports for ASP.NET projects
  • Easy to encode EAN-13 images to jpeg, gif, png, tiff, bitmap files in ASP.NET program
Here we will explain how to generate EAN-13 (a 13-digit standard linear barcode) in ASP.NET projects using C# and the OnBarcode Barcode Generator library. It covers basic generation, add‑on symbols, human‑readable text customization, advanced styling, and check‑digit validation. All content is optimized for ASP.NET Core, .NET Framework, MVC (Model‑View‑Controller), Razor Pages, Web API, and Blazor Server applications.



Core Content Overview
  • Handle valid EAN‑13 data input (12 or 13 digits) and avoid common runtime exceptions
  • Generate EAN‑13 barcodes with 2‑digit and 5‑digit add‑on symbols for retail and pricing use cases
  • Customize human‑readable text, font (OCR‑B), and margin spacing in ASP.NET
  • Adjust quiet zone indicators, digit spacing, and advanced visual properties
  • Validate and calculate EAN‑13 check digits using the MOD 10 algorithm

ASP.NET EAN-13 Generator DLL Introduction

Top
ASP.NET EAN-13 Generator is one of the barcode generation functions in OnBarcode's Barcode for ASP.NET Generation Controls, which generates & prints EAN-13 and 20+ other linear & 2D bar codes in ASP.NET web applications.
This article is providing several methods to use ASP.NET Barcode Generation Control to generate EAN-13 barcodes in ASP.NET web pages, ASP.NET web forms, and ASP.NET classes.

EAN-13 Generators

OnBarcode provides several EAN-13 Generator components and software, such asEAN-13 .NET, EAN-13 Java, EAN-13 C#, EAN-13 VB.NET, EAN-13 Generator.


Streaming EAN-13 Image into Your ASP.NET Web Pages

Top
  • Under downloaded trial package, copy barcode folder and its contents to your IIS, and create a new virtual directory, named "barcode".
  • Restart IIS, navigate to http://YourDomain:Port/barcode/linear.aspx?DATA=012345678912&TYPE=15.
  • To create barcode image in html or aspx pages, you can insert a image tag (img) into your web pages.
    For example, <img src="http://YourDomain:Port/barcode/linear.aspx?DATA=012345678912&TYPE=15" />

Generate EAN-13 into Your ASP.NET Web Forms

Top
  1. Install ASP.NET Barcode Generator Control.
  2. Add ASP.NET Barcode Generator Control to your Visual Studio ToolBox.
  3. Copy "linear.aspx" and "linear.aspx.cs" to the folder where your aspx pages are generating barcodes.
  4. Drag and drop "LinearWebForm" to your ASPX web forms.
  5. Run the website to view the barcodes generated. To customize EAN-13 settings, view EAN-13 barcode settings.

Generate EAN-13 Barcodes in ASP.NET Class

Top
If you need generate EAN-13 barcodes in your ASP.NET class using C# or VB.NET, we provides complete barcode generation source code for EAN-13 in C# and EAN-13 in VB.NET.



EAN-13 Barcode Add-on Symbol in ASP.NET

EAN‑13 supports optional 2‑digit or 5‑digit add‑on symbols (used for coupons, weight, or price). The add‑on appears after the main barcode's quiet zone.
  • Set Type to BarcodeType.EAN13_2 (2 digits) or EAN13_5 (5 digits)
  • Set main data in Data
  • Set add‑on data in SupData



EAN-13 Human Readable Text (HRI) Customization

GS1 standard recommends OCR‑B font for EAN‑13 text display. You can customize font, size, and spacing in ASP.NET.
  • TextFont: Set font to OCR‑B
  • TextMargin: Space between bars and text (minimum 0.5X, recommended 1X)



Note: If OCR‑B is not installed on the Hosting server, the barcode library will use a default font to render text. Include the font in your ASP.NET Publish package.


Advanced EAN-13 Customization in ASP.NET

You can enhance EAN‑13 barcodes for better readability and compliance in your ASP.NET application.


Quiet Zone Indicator

Control the quiet zone marker visibility:

barcode.ShowQuietZoneIndicator = false;



First & Last Digit Spacing

Adjust spacing for better scanning:

barcode.UPCEANLeadDigitSpace = 10;

barcode.UPCEANTrailDigitSpace = 10;

These settings are often used in ASP.NET View Component or Partial View for retail dashboards.



Summary

This guide follows enterprise ASP.NET best practices and integrates natively with MVC, Razor Pages, Web API, and Blazor.

Key Topics:
  • Supports 12/13 digit input with automatic check‑digit calculation
  • Supports 2‑digit and 5‑digit retail add‑on symbols
  • Fully customizable text, font, margins, and spacing
  • Advanced properties for quiet zone and digit layout
  • Compatible with Kestrel, IIS, Production Environment, and Deployment pipelines
You can now implement production‑ready EAN‑13 barcode features into any ASP.NET web application.







































Start with free trial package:








































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.