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

How to Generate Code39 in ASP.NET Web Server?

back to home  >  .NET Barcode Generator SDK  >   Generate Barcodes in ASP.NET  >  Generate Code 39 in ASP.NET

ASP.NET Code39 Creator is one of the Barcode generation functions in pqScan Barcode Creator for ASP.NET, which also can generate 2D barcodes in web pages, such as QR Code in ASP.NET, PDF417 in ASP.NET, Aztec Code in ASP.NET and Data Matrix in ASP.NET. In this tutorial, you can find three ways to make Code 39 in ASP.NET web applications.

Generating Code39 and drawing it on web pages by dragging & dropping ASP.NET Barcode Creator Web Control

To render Code 39 image in web page with pqScan Barcode Creator WebForms control, follow these steps:

  1. Unzip the downloaded Trial package to development computer.
  2. Add Barcode Creator Web Control to the Visual studio Toolbox.
    • In the ASP.NET application, display Toolbox pane.
    • Right click on the General pane and select Choose Items...
    • In the dialog Choose Toolbox Items, push the Browse button and navigate to the "PQScan.BarcodeCreator.dll" file.
    • Ensure the checkbox "BarCodeWebControl" is checked.
  3. In web form design mode, drag the BarcodeWebControl item from toolbox onto the web form.
  4. Copy "BarCodeWebHandler.ashx" file in to your ASP.NET web site.
  5. Run the web application and you will find a Code 39 barcode created on the page.

Creating and drawing Code39 on web page or html page in IIS

  1. Publish your ASP.NET web site to IIS.
  2. Copy "BarCodeWebHandler.ashx" file from downloaded barcode generator package to your IIS.
  3. Copy "PQScan.BarcodeCreator.dll" from downloaded barcode generator package to your IIS bin folder.
  4. Create an empty html, and inset an image tag like: <img src="http://localhost:port/BarcodeWebHandler.ashx?BarType=Code39&Data=123456789&Width=150&Height=100&ShowText=True"/> .
  5. Viewing html page on web browser, you will see the Code39 image generated on the page.

Note: When you use barcode web control to draw Code39 barcode image, please make sure the "BarCodeWebHandler.ashx" file is copied to the folder where the web page would add barcodes, otherwise the Code 39 image will not appear.

Creating and making Code39 barcode in ASPX forms class

Before starting generating Code39 in web pages, add the "PQScan.BarCodeCreator.dll" to your ASP.NET project reference. Then add the given C# Code below in page load method. Thing is finished so soon.

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

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

            code39.Data = "123456789";
            code39.BarType = BarCodeType.Code39;
            code39.Width = 200;
            code39.Height = 80;
            code39.ShowText = true;

            code39.CreateBarcode("code39-webforms.bmp");
        }
    }
}

generate code39 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 Code Creator in ASP.NET EAN 13 Creator in ASP.NET EAN 8 Creator in ASP.NET UPC A Creator in ASP.NET Code 128 Creator in ASP.NET