Home > ASP.NET Barcode > Linear Barcode in ASP.NET - Generate Codabar in ASP.NET

Codabar Barcode Control for ASP.NET Web Applications

Make and print Codabar images in ASP.NET Applications using Barcode ASP.NET Server Control

ASP.NET Barcode Generator is easy to integrate into your ASP.NET applications to generate Codabar images.

  • Integrate in Web Applications in C#.NET, VB.NET, managed C++, and Borland Delphi for .NET;

  • Support Barcode image generation and streaming in Microsoft IIS using URL;

  • Easy to define Codabar Start Character and Codabar Stop Charcter

  • Add option N to set the proportion of the wide bar to the narrow one in Codabar

  • Easy to enable tilde character to encode specific ASCII characters

  • Show human readable text with customizable Font, Color, and Margin Settings;

  • Equipped with more than 50 generation features on barcode size settings and color settings;

  • Reusable component in .NET Framework

Codabar Barcode Symbology Specification


  • Alias: Codeabar, Ames Code, NW-7, Monarch, Code 2 of 7, Rationalized Codabar, ANSI/AIM BC3-1995 or USD-4;


  • Developed in 1972 by Pitney Bowes Corp;
  • Widely used by U.S. blood banks, photo labs, and FedEx;


  • Variable data length;


  • Character Set:

    • Digits:0, 1, 2, 3, 4, 5, 6, 7, 8, 9;

    • - (Dash), $ (Dollar), : (Colon), / (Slash), . (Point), + (Plus)

 


Drag and drop Codabar barcode images to web forms applications in ASP.NET

  1. Download ASP.NET Barcode Trial and unzip

  2. Copy Avapose.Barcode.Encoder.ASPNET.dll to the project folder of your ASP.NET Web Application

    (The DLL will be copied to the bin directory automatically)

  3. Open you web project using Visual Studio

  4. Right Click in Toolbox Windows, select bar choose item…

  5. In Choose Toolbox Item Form, click Browse and find Avapose.Barcode.Encoder.ASPNET.dll

  6. Select .NET Framework Components BarCodeWeb

  7. Find Component BarCodeWeb in the Toolbox, drag and drop it in Components Tab

    (If there is no Components Tab in the Toolbox, add a new tab named Components)

  8. Drag and drop BarCodeWeb from Components Tab to the designer surface of your web project

  9. Click the BarCodeWeb on the designer surface, and view its properties by click Properties Window

  10. Find Property Symbology, and adjust its value to Codabar

  11. Redefine the value of Property Data according to the character you are going to encode in this Codabar image

  12. You can also change the value of other properties. See Property Settings information as follow

Add Codabar barcode images to URL and IIS in ASP.NET Web applications

  1. Create file Directory barcode in Internet Information Services (IIS)

    • Download ASP.NET Barcode Trial and unzip, remember the directory of the unzipped folder

    • Find Administrative Tools in Control Panel, open Internet Information Services

    • Expand your local computer and then Web Sites

    • Right Click Default Web Site and New a file Directory

    • In file Directory Creation Wizard, name the file Directory as barcode, and browse to find folder barcode in the folder unzipped from ASP.NET Barcode Trial

  2. Preview barcode image using web browser
    • Restart Internet Information Services (IIS)

    • Open an web browser, and input below URL in the address bar of the browser

      For example, data to encode is "12345678"

      http://YourDomain:Port/barcode/linear.aspx?DATA=12345678&SYMBOLOGY=1

    • View the barcode image and adjust the URL according to your need
  3. Create barcode image in html or aspx pages
    • Open your web page with html editor

    • Add an image tag into the web page

      For example:

      <img src="http://YourDomain:Port /barcode/linear.aspx?DATA=12345678&SYMBOLOGY=1" />

Codabar barcode Properties by using Barcode ASP.NET Server Control

Barcode Settings

Properties Value
Comments
Property URL Options Default
Data DATA (Data to encode in the Codabar) "128"

Codabar value to encode

Codabar Character Set:
  • Digits:0, 1, 2, 3, 4, 5, 6, 7, 8, 9;

  • - (Dash), $ (Dollar), : (Colon), / (Slash), . (Point), + (Plus)

SYMBOLOGY
SYMBOLOGY Codabar
Code128Auto

In ASP.NET, set the value to Symbology.Codabar
In IIS, set the value in URL to SYMBOLOGY=1

Codabar Special Settings

Properties Value
Comments
Property URL Options Default
CodabarStartChar

CODABAR
-START
-CHAR
A, B, C, or D
A

Codabar start char, valid values: CodabarStartStopChar.A, B, C, D

CodabarStopChar
CODABAR
-STOP-CHAR
A, B, C, or D
A

Codabar stop char, valid values: CodabarStartStopChar.A, B, C, D

Codabar Text Settings

Properties Value
Comments
Property URL Options Default
ShowText

SHOW-TEXT
True or False
True


Show text underneath the barcode

TextColor

TEXT-COLOR
Color
Black

Color of the shown text

TextFont
TEXT-FONT
Font
Arial, 10pt

The font, font style and font size of the text

TextMargin
TEXT-COLOR
float
6

The space between the text and the barcode symbol

Codabar Size Settings

Properties Value
Comments
Property URL Options Default
Angle

ANGLE
Degree0, 90, 180, 270
Degree0

Rotate the Angle of the Codabar images

AutoResize

AUTO-RESIZE
True or False
False

Auto resize the generated barcode image

BarcodeImageHeight
BARCODE-IMAGE-HEIGHT
float
0

Barcode image Height

BarcodeImageWidth
BARCODE-IMAGE-WIDTH
float
0

Barcode image Width

BottomMargin
BOTTOM-MARGIN
float
0

Barcode image bottom margin size
MarginLeft MARGINE-LEFT float 0


Barcode image left margin size

RightMargin RIGHT-MARGIN float 0

Barcode image right margin size.

TopMargin TOP-MARGIN float 0


Barcode image Top margin size
UOM
UOM
Pixel, Cm, or Inch
Pixel

Unit of Measure for all numeric properties
X X float 2

Width of barcode bar module (narrow bar), default is 2 pixel

Y Y float 75

Height of barcode bar module, default is 75 pixel

Codabar Color Settings

Properties Value
Comments
Property URL Options Default
BackgroundColor
BACK
-GROUND-COLOR
Color
white

Barcode image background color

ForegroundColor
FORE
GROUND-COLOR
Color
black
Barcode image foreground color

Codabar Image Settings

Properties Value
Comments
Property URL Options Default
DPI
DPI
float
72

Resolution of Codabar Image, Dots Per Inch

ImageFormat
IMAGE-FORMAT
Memory Bmp, Bmp, Emf, Wmf, Gif, Jpeg, Png, Tiff, Exif, or Icon
Gif
Barcode image format