Top-notch and competitive asp.net barcode component dll on the market
Compatible with latest 1D and 2D barcode symbology standards
Create linear barcodes for ASP.NET web, like Code39, Code128, GS1-128, Interleaved 2 of 5, EAN / UPC
Create 2d barcode images for ASP.NET web, like Data Matrix, PDF-417, & QR-Code
Print barcode in high resolution PNG, TIFF, Bitmap raster images and SVG, EPS vector images
Fulfill development needs by providing royalty-free developer license for ASP.NET Web Barcode Control DLL
This document is about how you can do with ASP.NET Barcode Generator component to generate barcodes in your ASP.NET class, ASPX design pages applications.
ASP.NET Barcode Generator Library
QR Code, Data Matrix, Code 128, GS1, EAN/UPC. Unicode text encoding in C# ASP.NET web application.
Now you can print and display a barcode in the ASP.NET Razor Page.
Customize, print barcode image size in Razor Page
You can specify the generated barcode image dimension size in Razor Page. And you can use web browser to print the web page with specified barcode image size.
Here we will generate barcode images that are 4 inches wide and 1.6 inches high.
In file Index.cshtml.cs.
Specify the barcode image unit of measure, image width and height in C# code.
Now let's run the ASP.NET Core web app, and print the Razor Page to a PDF file using web browser printer.
You can measure the barcode image size in the PDF file using
Adobe Acrobat.
Create Barcode Image in web application through URL web request
BarcodeLib ASP.NET Barcode Generator library supports barcode generation through web url. In the following tutorial, we will
quickly create a new ASP.NET Core web application to enable barcode generation through URL.
Step 1: Create a new ASP.NET Core web project
Open Visual Studio, Create a new ASP.NET Core Empty web project. Click Next.
Choose project name BarcodeLib.BarcodeGenerator.ASPNET.URL. Click Next.
Choose .NET 8.0 for Framework. Click Create.
Step 2: Add barcode library to the project
Go to the downloaded package /Dll/net-standard/, add the following two dlls to the ASP.NET project reference.
BarcodeLib.Barcode.AspNetCore.dll
BarcodeLib.Barcode.Common.dll
In Visual Studio, install System.Drawing.Common from NuGet Package Manager
Step 3: Add C# code to enable barcode generation through url
Add the following C# code to the project file Program.cs
Run the app in Visual Studio. You can embed the barcode generation url in html image tag, .net reports, and Microsoft Excel Spreadsheet (web version).
Linear Barcode in Browser
QR Code in Browser
How to create barcode in ASP.NET Framework web forms application?
In this section, we will explain how to use ASP.NET Barcode library to generate barcode images in ASP.NET Framework web forms application.
BarcodeLib ASP.NET Barcode Generatoion library supports.
.NET Framework 4.x, 3.x and 2.x
ASP.NET Barcode Control - Barcodes Generation through ASP.NET Web Controller
Install ASP.NET Barcode Controller to your ASP.NET project.
Add Reference BarcodeLib.Barcode.ASP.NET.dll to your project. There's no need to copy barcoding dll to your project bin folder because Visual Studio will do it for you during project compilation time.
Add barcode library to your Visual Studio Toolbox.
Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
Right click Toolbox, click menu Choose Items...
Goto .NET Framework Components tab.
If no BarcodeLib component found, click Browse... button and select BarcodeLib.Barcode.ASP.NET.dll file.
Then sort "Namespace" column, you will find 4 components from BarcodeLib.Barcode.
Check component LinearASPNET, and its namespace is BarcodeLib.Barcode.
Check component DataMatrixASPNET, and its namespace is BarcodeLib.Barcode.
Check component PDF417ASPNET, and its namespace is BarcodeLib.Barcode.
Check component QRCodeASPNET, and its namespace is BarcodeLib.Barcode.
Click "OK" button, you will find four components under "General": LinearASPNET, DataMatrixASPNET, PDF417ASPNET, QRCodeASPNET.
Go to "barcode" folder in the trial package, copy files "linear.aspx", "linear.aspx.cs", "datamatrix.aspx", "datamatrix.aspx.cs", "pdf417.aspx", "pdf417.aspx.cs", "qrcode.aspx", "qrcode.aspx.cs" to the same folder as your aspx page, which will generate barcodes.
You can drag LinearASPNET on your aspx page, change barcode setting through properties window.
Run the project, you will find barcode images generated in your aspx pages.
Barcode Generation without Web Controller
Under downloaded trial package, copy barcode folder to your IIS folder, e.g. C:\Inetpub.
Create a new virtual directory in IIS, named barcode, and link to the above "barcode" folder.
Restart Microsoft IIS.
To test your installation, open your web browser and navigate to: http://YourDomain:Port/barcode/linear.aspx?Type=7&Data=CODE39-123456789012
To create barcode image in your aspx or html page, you need pass the url to IMG tag src value. For linear barcode <img src="http://YourDomain:port/barcode/linear.aspx?Type=7&Data=CODE39-123456789012" /> or for Data Matrix <img src="http://YourDomain:port/barcode/datamatrix.aspx?Data=BarcodeLib12345678&ModuleSize=4&LeftMargin=8&RightMargin=8&TopMargin=8&BottomMargin=8" /> or for PDF417 <img src="http://YourDomain:port/barcode/pdf417.aspx?Data=123456789&ModuleSize=3&LeftMargin=6&RightMargin=6&TopMargin=6&BottomMargin=6" /> or for QRCode <img src="http://YourDomain:port/barcode/qrcode.aspx?Data=0123456789&ModuleSize=3&LeftMargin=12&RightMargin=12&TopMargin=12&BottomMargin=12" /> Using this method, it will not generate any barcode images in your IIS server side.