QR Code Image Sample - pqScan.com
ASP.NET UPC-A Creator Web Forms Control Encoding UPC-A Barcode Image in ASP.NET Web forms Online Demo Download Trial Purchase Now
.NET Winforms
ASP.NET
C#-VB

How to Generate UPC-A in ASP.NET Web Server?

back to home  >  .NET Barcode Generator SDK  >  Generate Barcodes in ASP.NET  >  Generate UPC-A in ASP.NET

ASP.NET UPC-A Creator is one of the barcode generation functions in pqScan Barcode Creator for ASP.NET. In this tutorial, you can find three ways to generate UPC-A in ASP.NET web applications.

For more help, we also provide generating QR Code in ASP.NET, making Code 128 in ASP.NET, creating Aztec Code in ASP.NET.

Generating UPC-A and painting it on web pages using ASP.NET Barcode Creator Web Control in Visual Studio

To use the pqScan Barcode Creator WebForms control to print UPC-A, follow these steps:

  1. Unzip the downloaded UPC-A barcode generator package to your web project's bin folder.
  2. Add ASP.NET Barcode Creator Web Control to Visual Studio Toolbox.
  3. Copy "BarcodeWebHandler.ashx" file to the file path where the web page you want to draw UPC-A images.
  4. Drag and drop BarcodeWebControl item to your ASPX web forms.
  5. Run the web application to view the UPC-A barcode generated.
  6. You can change property setting in the right-side pane or reset properties in run-time code to customize the UPC-A barcode image. And using JavaScript to change the ASP.NET UPC-A Creator web image control's src property is also supplied.

Creating and printing UPC-A on web page or html page in IIS

  1. Publish your ASP.NET web site to IIS.
  2. Copy bin folder from downloaded barcode generator package to your IIS.
  3. Copy "BarcodeWebHandler.ashx" file from downloaded barcode generator package to your IIS.
  4. Create an empty html, inset image tag like: <img src="http://localhost:port/BarcodeWebHandler.ashx?BarType=UPCA&Data=12345678901&Width=150&Height=100&ShowText=True"/>.
  5. Open html page on web browser to view the UPC-A rendered on the page.

Note: Please make sure the "BarcodeWebHandler.ashx" file is copied to the folder where the web pages are generating barcodes, otherwise the UPC-A image will not appear.

Encoding and rendering UPC-A use ASP.NET Barcode Creator API in web form class

Finally, we will provide you how to encode UPC-A barcode using component API. Look at the following C# words, the only thing you need is to add the code to your web page.

using System;
using System.Web;
using System.Web.UI;
using PQScan.BarcodeCreator;

namespace UPCAGeneratorInWeb
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Barcode upca = new Barcode();

            upca.Data = "12345678901";
            upca.BarType = BarCodeType.UPCA;
            upca.Width = 200;
            upca.Height = 100;
            upca.ShowText = true;

            upca.CreateBarcode("f:/upca-webforms.jpeg");
        }
    }
}

generate upca in asp.net

.NET Barcode Creator QR Code Creator in ASP.NET Data Matrix Creator in ASP.NET PDF 417 Creator in ASP.NET Aztec Creator in ASP.NET EAN 13 Creator in ASP.NET EAN 8 Creator in ASP.NET Code 128 Creator in ASP.NET Code 39 Creator in ASP.NET