Home  >  ASP.NET Barcode Generator Components  >  How to Print Barcode in ASP.NET  >  How to Create Code 39 Barcode in ASP.NET projects
Code 39 ASP.NET Barcode Generator Library
Code 39 ASP.NET Barcode Generating Class Library is used to insert, create, or design Code 39 barcodes in ASP.NET web server applications using C# and VB.NET.
Code 39 ASP.NET Barcode Generator Library - Overview
Code-39 ASP.NET Barcode generator is a fully-functional linear barcode creator component for ASP.NET web applications. Using this ASP.NET Code 39 barcode generating control, users can create Code 39 barcode image (also called USS Code 39, Code 3/9, Code 3 of 9, USD-3, Alpha39, or Type 39), in your ASP.NET web server applications.
Other widely-used barcoding solutions for generating & printing Code 39 barcode image in .NET projects:
Features - Code 39 ASP.NET Barcode Generator Component

ASP.NET Code 39 Barcode Generator Control- Technology

ASP.NET Code 39 Barcode Generator Control - Image Settings

View more about Code 39 Barcode Properties of ASP.NET Barcode Generator Library
Generation Guidance - Code 39 ASP.NET Barcode Generator Component
This ASP.NET Code 39 barcoding library offers users three ways to generate & create Code 39 barcode images.

How to Create Code 39 Barcode in ASP.NET Web Controller

  1. Download & unzip the KeepDynamic.BarCode.AspNet.Eval
  2. Add KeepDynamic.BarCode.AspNet.dll from the file Library to your ASP.NET project and Visual Studio Toolbox
  3. Copy "linear.aspx", "linear.aspx.cs" from barcode folder in Documentation to your ASP.NET project
  4. Drag & drop BarCodeControl from the Toolbox to your ASP.NET project and a barcode image will be generated
  5. Click generated barcode image, change the value of SymbologyType to Code39 and adjust the value of CodeText to Code 39 barcode encodable characters(numbers 1-9 & upper-class alphanumeric characters A-Z) in the Properties window
  6. Run the ASP.NET project and a standard Code 39 barcode image will be created

How to Generate Code 39 Barcode in ASP.NET Class Applications

  1. Integrate KeepDynamic.BarCode.AspNet.dll from the file Library to your ASP.NET project by adding reference
  2. Copy following C# or VB.NET class code to generate Code 39 barcode images in ASP.NET web applications.
Generate Code 39 barcode images in ASP.NET using C#
// generate linear barcode object 
BarCode barcode = new BarCode();

// Set barcode type to Code-39
barcode.SymbologyType = SymbologyType.Code39;

// Enter encodable value to Code39 barcode
barcode.CodeText = "CODE39";

//Display Code 39 start / stop character
barcode.DisplayStartStopChar = true;

// Add checksum character to Code 39
barcode.EnableChecksum = true;

// set wide & narrow bar width ratio
barcode.WideNarrowRatio = 3;

// set Code 39 barcode image settings
// Set bar width of Code 39
barcode.X = 3;

// set Code 39 barcode image
barcode.BarCodeWidth = 500;
barcode.BarCodeHeight = 90;

// Set Code39 drawing image format to PNG
barcode.Format = System.Drawing.Imaging.ImageFormat.Png;

// save generated barcode images to png image file using C#
barcode.drawBarcode("C://kdcode39.png");
Generate Code 39 barcode images in ASP.NET using VB.NET
' generate linear barcode object 
Dim barcode As New BarCode()

' Set barcode type to Code-39
barcode.SymbologyType = SymbologyType.Code39

' Enter encodable value to Code39 barcode
barcode.CodeText = "CODE39"

'Display Code 39 start / stop character
barcode.DisplayStartStopChar = True

' Add checksum character to Code 39
barcode.EnableChecksum = True

' set wide & narrow bar width ratio
barcode.WideNarrowRatio = 3

' set Code 39 barcode image settings
' Set bar width of Code 39
barcode.X = 3

' set Code 39 barcode image
barcode.BarCodeWidth = 500
barcode.BarCodeHeight = 90

' Set Code39 drawing image format to PNG
barcode.Format = System.Drawing.Imaging.ImageFormat.Png

' save generated barcode images to png image file using VB.NET
barcode.drawBarcode("C://kdcode39.png")

How to Generate Code 39 Barcode in IIS using ASP.NET Barcoding Library

  1. Find folder barcode in the folder Documentation of downloaded trial package.
  2. Copy cotent of folder barcode to your IIS project, eg:C:\interpub
  3. Create a new virtual directory in your IIS named "barcode", and connect it to the above barcode folder in the C:\interpub
  4. Restart your Microsoft IIS and navigate to:
    http://YourDomain:Port/barcode/linear.aspx?symbology-type=4&code-text=39393939&x=1&left-margin=10&right-margin=10
  5. Now, a Code 39 barcode is created on a page. Besides, you can use the following image tag to generate a Code 39 barcode on your html or aspx pages.
    <img src="http://YourDomain:Port/barcode/linear.aspx?symbology-type=4&code-text=39393939&x=1&left-margin=10&right-margin=10" />
Note: X refers to bar width and code-text refers to encodable characters.
Barcode Types - Code 39 ASP.NET Barcode Generator Component