Show / Hide Table of Contents

WebForms Getting Started

System Requirements

For developing ASP.NET applications with Neodynamic Barcode Professional for ASP.NET WebForms, you must have the following system and software specifications:

  • .NET Framework 2.0 or greater with its latest service pack.

Visual Studio Configuration

  • Launch Visual Studio
  • Create a new ASP.NET Web Application/Website project.
  • Open the Toolbox, right-click on it and select Choose Items
  • Select the .NET Framework Components tab. You will find the Neodynamic.WebControls.BarcodeProfessional assembly listed.
    • If you cannot find it...
    • Click on Browse button, and navigate to the folder you installed it to.
    • Browse to the Bin\For .NET 2.0-3.5-4.x folder.
    • Select Neodynamic.WebControls.BarcodeProfessional.dll from that dialog, and click on Open.
    • Click on OK button.
  • Double-click on Barcode Professional assembly to select it, then click on OK.
  • The Barcode Professional control should now appear in the Toolbox.

First Steps with Barcode Professional for ASP.NET WebForms

  • In your ASP.NET Website project, add a reference to Neodynamic.WebControls.BarcodeProfessional.dll which is located in the installation folder of our product (under Bin subfolder)

  • Then, in the web page (aspx) where you'd like to display the barcode image, add the following directive:

<%@ Register Assembly="Neodynamic.WebControls.BarcodeProfessional" Namespace="Neodynamic.WebControls.BarcodeProfessional" TagPrefix="neobarcode" %>
  • Now, in the page's body, insert the markup to render the barcode. In this snipped code, the barcode type, a.k.a. Symbology, will be QRCode and the value to encode is ABC12345
<neobarcode:BarcodeProfessional ID="Barcode1" runat="server" Symbology="QRCode" Code="ABC12345" />
  • Please refer to the API Documentation for more settings, properties & methods.

  • That's it! Just view the page on a browser and a QR Code symbol will be displayed.

Barcode Professional can generate most popular Linear (1D), Postal, Component Composite, MICR & 2D Barcode Symbologies including Code 39, Code 128, GS1-128, GS1 DataBar (RSS-14), EAN 13 & UPC, ISBN, ISBT-128, Postal (USPS, British Royal Mail, Australia Post, DHL, FedEx), Data Matrix, QR Code, PDF 417, Aztec Code, UPS MaxiCode, Chinese Han Xin Code, IFA PPN, MICR E-13-B Characters, all EAN/UPC Composite Barcodes (CC-A, CC-B & CC-C) and many more barcode standards

If you need further assistance, please contact our team at https://www.neodynamic.com/support

Rendering Methods

Barcode Professional features two rendering methods - managed by RenderingMethod property - to serve barcode image requests.

Default Rendering Method

When default rendering method is set, Barcode Professional will use the infrastructure of the ASP.NET WebForm where it's placed on in order to serve barcode image requests. Barcode Professional accomplishes it by creating the src attribute of the image tag with the following format:

<img id="BarcodeProfessional1" src="https://server/WebAppName/Default.aspx?bcp70=" ... />

In this case the name of the ASP.NET WebForm which contains the Barcode Professional control is Default.aspx. Default rendering method does not require any extra work for developers, but it comes at a cost. That cost is the time and resources - consumed by ASP.NET Runtime - in re-creating the WebForm class each time a barcode image request comes in. For better performance, use HttpHandler rendering method instead.

HttpHandler Rendering Method

HttpHandler requires some extra settings for developers. In doing so, though, you gain in performance. When HttpHandler rendering method is set, Barcode Professional will use the ASP.NET HTTP Handler infrastructure in order to serve barcode image requests.

Follow these steps to set up HttpHandler as the rendering method to use:

  • Set the RenderingMethod property to HttpHandler

  • Set up the Web.config file of your ASP.NET Web Application so it can recognize the Barcode Professional built-in HTTP Handler. Add the following entry in the web.config file:

<system.web>      
     ...
   <httpHandlers>
       <add verb="*" path="BarcodeGen.axd" type="Neodynamic.WebControls.BarcodeProfessional.BarcodeProfessional, Neodynamic.WebControls.BarcodeProfessional"/>
   </httpHandlers>
     ...
</system.web>

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
        <add name="BarcodeGen" verb="*" path="BarcodeGen.axd" type="Neodynamic.WebControls.BarcodeProfessional.BarcodeProfessional, Neodynamic.WebControls.BarcodeProfessional"/>
    </handlers>
</system.webServer>

HttpHandler rendering method is better than Default method because no WebForm class parsing and generation is required to server the barcode image request.

Codeless Barcode Generation

Codeless Barcode Generation (CBG) is a feature that lets you to render barcode images on ASP.NET Webforms or simple HTML pages by just setting up a special/formatted URL to a standard ASP.NET Image Control or HTML's IMG tag without the need of coding VB or C# sentences for barcode rendering.

Codeless Barcode Generation is simple and the concept is very straightforward. For enabling CBG in an ASP.NET web application, you must:

  • Add a reference to Neodynamic.WebControls.BarcodeProfessional.dll assembly in your project (BIN folder).

  • Set up the Web.config file of your ASP.NET Web Application so it can recognize CBG. CBG requires you specify an ASP.NET HTTP Handler name to associate it to Barcode Professional assembly. That name can be any you want, but we recommend using BarcodeGen.axd. So, supposing you decide naming CBG in that way, then the web.config entry must be set up as follows:

<system.web>      
     ...
     <httpHandlers>
          <add verb="*" path="BarcodeGen.axd" type="Neodynamic.WebControls.BarcodeProfessional.BarcodeProfessional, Neodynamic.WebControls.BarcodeProfessional"/>
     </httpHandlers>
     ...
</system.web>

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
        <add name="BarcodeGen" verb="*" path="BarcodeGen.axd" type="Neodynamic.WebControls.BarcodeProfessional.BarcodeProfessional, Neodynamic.WebControls.BarcodeProfessional"/>
    </handlers>
</system.webServer>
  • The last step involves creating a special/formatted URL and set up it to ImageUrl property of an Image control. For example, the following URL will generate a Code 39 barcode encoding the value 1234567890
Image1.ImageUrl = "~/BarcodeGen.axd?S=Code39&C=1234567890"

In the sample URL string, the S parameter is for specifying the Barcode Symbology you want to create and the C parameter is for specifying the value to encode in the specified Symbology.

The URL for CBG lets you to specify many other parameters like Bar's Width and Height, DPI, Output Image Format, Font, additional Text, etc. Below is a list of valid parameters and their meanings.

CBG URL Parameters

The following parameters (in the first column) have the same meaning of the associated BarcodeProfessional property (in the second column). The third column shows an example for each parameter. In addition, please refer to Note column for some additional info about each parameter.

IMPORTANT

  • The URL is composed of a series of param-value pairs.

  • The first parameter in the URL must be S (for Symbology), followed by C (for value to encode "Code" property) and finally followed by any other parameters.

  • Param-value pairs are separated by & (ampersand character).

  • The param-value pairs are each separated by an equal sign.

PARAM BarcodeProfessional Property Example NOTE
AC AddChecksum AC=T Just do not specify this param if it has False value
AA AntiAlias AA=T Just do not specify this param if it has False value
ABIP ArtBarImagePattern ABIP=BASE64-IMAGE-CONTENT The value for this param must be a local image file path like c:\temp\image.png or a BASE64 content
ALI ArtLogoImage ALI=BASE64-IMAGE-CONTENT The value for this param must be a local image file path like c:\temp\image.png or a BASE64 content
ALIO ArtLogoImageOpacity ALIO=50 The opacity must be an integer number from 1 (almost fully transparent) to 100 (fully opaque)
ALIPER ArtLogoImagePercentage ALIPER=25
ALIP ArtLogoImagePosition ALIP=Top Param's value must be one of the LogoPosition Enumeration values
ACBE AztecCodeByteEncodingName ACBE=ISO-8859-1
ACEC AztecCodeErrorCorrection ACEC=23
ACF AztecCodeFormat ACF=Auto Param's value must be one of the AztecCodeFormat Enumeration values
ACPT AztecCodeProcessTilde ACPT=T Just do not specify this param if it has False value
ACR AztecCodeRune ACR=-1
ASZ AutoSize ASZ=T Just do not specify this param if it has False value
BKC BackColor BKC=#FFFFFF It must be specified as a HTML color
BC BarColor BC=#000000 It must be specified as a HTML color
BU BarcodeUnit BU=Inch Param's value must be one of the BarcodeUnit Enumeration values
BH BarHeight BH=0.5 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
BR BarRatio BR=2
BW BarWidth BW=0.01 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
BWA BarWidthAdjustment BWA=0.0001 Values can be positive (enlarge) or negative (reduce).
BBS BearerBarStyle BBS=Frame Param's value must be one of the BearerBarStyle Enumeration values
BBW BearerBarWidth BBW=0.05 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
BRC BorderColor BRC=#000000 It must be specified as a HTML color
BRR BorderRadius BRR=.02 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
BRW BorderWidth BRW=2px Values must be specified in pixels
BM BottomMargin BM=0.1 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
BPAD BottomPadding BPAD=0.1 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
CSC1 CodabarStartChar CSC1=A Param's value must be one of the CodabarStartStopChar Enumeration values
CSC2 CodabarStopChar CSC2=B Param's value must be one of the CodabarStartStopChar Enumeration values
C Code C=1234567890
CB64 Code CB64=MTIzNDU2Nzg5MA== Use this param to specify a value to encode that might contain non-printable characters or bytes
CB64Enc CB64=UTF-8 Use this param to specify which Encoding or CodePage must be used to convert the CB64 param value back to a string that will be set to the Code property
C128CS Code128CharSet C128CS=Auto Param's value must be one of the Code128 Enumeration values
C16KM Code16kMode C16KM=Mode0 Param's value must be one of the Code16k Enumeration values
CA CodeAlignment CA=BelowCenter Param's value must be one of the Alignment Enumeration values
CFP CodeFormatPattern CFP=SAMPLE-{0} Based on String.Format()
CHC ChannelCode CHC=8 Param's value must be from 3 up to 8.
DMBE DataMatrixByteEncodingName DMBE=ISO-8859-1
DME DataMatrixEncoding DME=Auto Param's value must be one of the DataMatrixEncoding Enumeration values
DMF DataMatrixFormat DMF=Auto Param's value must be one of the DataMatrixFormat Enumeration values
DMFID DataMatrixFileId DMFID=001001
DMPT DataMatrixProcessTilde DMPT=T Just do not specify this param if it has False value
DMSC DataMatrixSymbolCount DMSC=1
DMSI DataMatrixSymbolIndex DMSI=1
DMIRF DataMatrixIncludeRectFormatsInAutoMode DMIRF=T Just do not specify this param if it has False value
DCHK DisplayChecksum DCHK=T Just do not specify this param if it has False value
DC DisplayCode DC=T Just do not specify this param if it has False value
DLMI DisplayLightMarginIndicator DLMI=T Just do not specify this param if it has False value
DOTCC DotCodeColumns DOTCC=0 0 means automatic, or a value from 5 to 200
DOTCR DotCodeRows DOTCR=0 0 means automatic, or a value from 5 to 200
DOTCPT DotCodeProcessTilde DOTCPT=T Just do not specify this param if it has False value
DOTCAR DotCodeAspectRatio DOTCAR=4:3 Columns (width) to Rows (height) Aspect Ratio
DSSC DisplayStartStopChar DSSC=T Just do not specify this param if it has False value
DPI Dpi DPI=96
EB ErrorBehavior EB=BlankImage Param's value must be one of the ErrorBehavior Enumeration values
EUBWA EanUpcAutoBWAfor1278DigitsEnabled EUBWA=T Just do not specify this param if it has False value
EUMF EanUpcMagnificationFactor EUMF=0.8 0.8 means 80% magnification
EUS EanUpcSupplement EUS=Digits5 Param's value must be one of the Supplement Enumeration values
EUSC EanUpcSupplementCode EUSC=12345 "For this param takes effect
EUSS EanUpcSupplementSeparation EUSS=0.15 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
EUSTM EanUpcSupplementTopMargin EUSTM=0.15 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
EXT Extended EXT=T Just do not specify this param if it has False value
FITW FitBarsAreaToSize.Width FITW=1.5 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
FITH FitBarsAreaToSize.Height FITH=0.75 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
FTIP FitProportional FITP=T Just do not specify this param if it has False value
FNTB Font.Bold FNTB=T Just do not specify this param if it has False value
FNTI Font.Italic FNTI=T Just do not specify this param if it has False value
FNTN Font.Name FNTN=Arial
FNTSZ Font.Size FNTSZ=10 Values must be specified in points
FNTS Font.Strikeout FNTS=T Just do not specify this param if it has False value
FNTU Font.Underline FNTU=T Just do not specify this param if it has False value
FNTC ForeColor FNTC=#000000 It must be specified as a HTML color
GB GuardBar GB=T Just do not specify this param if it has False value
GBH GuardBarHeight GBH=0.5 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
GS1DSV GS1DataStrictValidation GS1DSV=T Just do not specify this param if it has False value
H15434 HibcUseIsoIec15434Encoding H15434=T Just do not specify this param if it has False value
HEIGHT Height HEIGHT=1.25 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
HFHRT HibcFormatHumanReadableText HFHRT=T Just do not specify this param if it has False value
HQGIF HighQualityGif HQGIF=T Just do not specify this param if it has False value
HRT HumanReadableText HRT=Product ID - 12345
HXCBE HanXinCodeByteEncodingName HXCBE=ISO-8859-1
HXCE HanXinCodeEncoding HXCE=Auto Param's value must be one of the HanXinCodeEncoding Enumeration values
HXCEC HanXinCodeErrorCorrectionLevel HXCEC=L1 Param's value must be one of the HanXinCodeErrorCorrectionLevel Enumeration values
HXCV HanXinCodeVersion HXCV=Auto Param's value must be one of the HanXinCodeVersion Enumeration values
HXCPT HanXinCodeProcessTilde HXCPT=T Just do not specify this param if it has False value
IFMT ImageFormat IFMT=Gif Param's value must be one of the BarcodeImageFormat Enumeration values. NOTE: You can also specify WBMP string for Wireless Bitmap image format and EPS for Encapsulated PostScript format.
IDS Isbt128DataStructure IDS=DS001 Param's value must be one of the Isbt128DataStructure Enumeration values.
JABC JABCodeColors JABC=8
JABSC JABCodeSymbolCount JABSC=1
JABSECC JABCodeSymbolEccLevel JABSECC=5
JABSP JABCodeSymbolPosition JABSP=0
JABSV JABCodeSymbolVersion JABSV=1x1
LHM Itf14LeftHMark LHM=None Param's value must be one of the ItfHmark Enumeration values
RHM Itf14RightHMark RHM=None Param's value must be one of the ItfHmark Enumeration values
LPAD LeftPadding LPAD=0.1 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
MICRCH MICRCharHeight MICRCH=0.117 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
MICRCW MICRCharWidths MICRCW=0.091 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
MICRCS MICRCharSpacing MICRCS=0.125 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
MXDPBS MaxiCodeDrawPixelBasedSymbol MXDPBS=T Just do not specify this param if it has False value
MXM MaxiCodeMode MXM=Mode4 Param's value must be one of the MaxiCodeModes Enumeration values.
MXPT MaxiCodeProcessTilde MXPT=T Just do not specify this param if it has False value
MXSC MaxiCodeSymbolCount MXSC=1
MXSI MaxiCodeSymbolIndex MXSI=1
MPDFV MicroPdf417Version MPDFV=Auto Param's value must be one of the MicroPdf417Version Enumeration values.
MQR MicroQRCodeVersion MQR=Auto Param's value must be one of the MicroQRCodeVersion Enumeration values.
1BPP Monochrome 1BPP=T Just do not specify this param if it has False value
MSICHK MsiChecksum MSICHK=OneMod10 Param's value must be one of the MsiChecksum Enumeration values.
PDFAR Pdf417AspectRatio PDFAR=0.5 Float point number from 0 to 1
PDFC Pdf417Columns PDFC=0 Integer number from 0 to 30
PDFCT Pdf417CompactionType PDFCT=Auto Param's value must be one of the Pdf417CompactionType Enumeration values.
PDFEC Pdf417ErrorCorrectionLevel PDFEC=Level2 Param's value must be one of the Pdf417ErrorCorrection Enumeration values.
PDFID Pdf417FileId PDFID=123
PDFR Pdf417Rows PDFR=0 "Integer number from 3 to 90
PDFSC Pdf417SegmentCount PDFSC=2
PDFSI Pdf417SegmentIndex PDFSI=0
PDFT Pdf417Truncated PDFT=T Just do not specify this param if it has False value
PHBS PharmacodeBarsSpacing PHBS=0.04 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
PHBW1 PharmacodeThickBarWidth PHBW1=0.06 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
PHBW2 PharmacodeThinBarWidth PHBW2=0.02 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
PH2DCF Pharmacode2DColorFields PH2DCF=Standard Param's value must be one of the Pharmacode2DColorFields Enumeration values.
PH2DCF1 Pharmacode2DColorField1 PH2DCF1=000000 It must be specified as a HTML color in Hex format
PH2DCF2 Pharmacode2DColorField2 PH2DCF2=000000 It must be specified as a HTML color in Hex format
PH2DCF3 Pharmacode2DColorField3 PH2DCF3=000000 It must be specified as a HTML color in Hex format
PH2DCF4 Pharmacode2DColorField4 PH2DCF4=000000 It must be specified as a HTML color in Hex format
PH2DCF5 Pharmacode2DColorField5 PH2DCF5=000000 It must be specified as a HTML color in Hex format
PH2DCF6 Pharmacode2DColorField6 PH2DCF6=000000 It must be specified as a HTML color in Hex format
PH2DCF7 Pharmacode2DColorField7 PH2DCF7=000000 It must be specified as a HTML color in Hex format
PH2DCF8 Pharmacode2DColorField8 PH2DCF8=000000 It must be specified as a HTML color in Hex format
PH2DTM Pharmacode2DTriggerMark PH2DTM=Left Param's value must be one of the Pharmacode2DTriggerMark Enumeration values.
PLHSB PlanetHeightShortBar PLHSB=0.06 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
PLHTB PlanetHeightTallBar PLHTB=0.135 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
P4SSSC Postal4StateAddStartStopChar P4SSSC=T Just do not specify this param if it has False value
P4SBS Postal4StateBarsSpacing P4SBS=0.03 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
P4STBH Postal4StateTrackerBarHeight P4STBH=0.08 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
P4STBW Postal4StateTrackerBarWidth P4STBW=0.02 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
POHSB PostnetHeightShortBar POHSB=0.06 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
POHTB PostnetHeightTallBar POHTB=0.135 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
QRBE QRCodeByteEncodingName QRBE=ISO-8859-1
QRE QRCodeEncoding QRE=Auto Param's value must be one of the QRCodeEncoding Enumeration values.
QREC QRCodeErrorCorrectionLevel QREC=M Param's value must be one of the QRCodeErrorCorrectionLevel Enumeration values.
QRPT QRCodeProcessTilde QRPT=T Just do not specify this param if it has False value
QRV QRCodeVersion QRV=Auto Param's value must be one of the QRCodeVersion Enumeration values.
QZ QuietZoneWidth QZ=0.1 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
RPAD RightPadding RPAD=0.1 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
ROT Rotate ROT=None Param's value must be one of the Rotate Enumeration values.
SDP SnapsToDevicePixels SDP=T Just do not specify this param if it has False value
SPR SegmentsPerRow SPR=4
S Symbology S=Code39 Param's value must be one of the Symbology Enumeration values.
T Text T=Product ID
TA TextAlignment TA=AboveCenter Param's value must be one of the Alignment Enumeration values.
TFNTB TextFont.Bold TFNTB=T Just do not specify this param if it has False value
TFNTI TextFont.Italic TFNTI=T Just do not specify this param if it has False value
TFNTN TextFont.Name TFNTN=Arial
TFNTSZ TextFont.Size TFNTSZ=10 Values must be specified in points
TFNTS TextFont.Strikeout TFNTS=T Just do not specify this param if it has False value
TFNTU TextFont.Underline TFNTU=T Just do not specify this param if it has False value
TFNTC TextForeColor TFNTC=#000000 It must be specified as a HTML color
TFP TextFormatPattern TFP=SAMPLE-{0} Based on String.Format()
TIFFC TiffCompression TIFFC=CCITT4 Param's value must be one of the TiffCompression Enumeration values.
TM TopMargin TM=0.1 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
TPAD TopPadding TPAD=0.1 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
UPCE UpcESystem UPCE=System0 Param's value must be one of the UpcE Enumeration values.
UQZT UseQuietZoneForText UQZT=T Just do not specify this param if it has False value
WIDTH Width WIDTH=4.5 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.
FIM UspsFimPattern FIM=A Param's value must be one of the FIM Enumeration values.
HBC UspsHorizontalBarsCount HBC=10
MS AztecCodeModuleSize, DataMatrixModuleSize, QRCodeModuleSize, HanXinCodeModuleSize, DotCodeModuleSize, JABCodeModuleSize MS=0.02 Values must be specified in the same unit set up to BarcodeUnit property. Default is inch.

Need Assistance?

  • For tech assistance please contact our Support
Back to top Copyright © 2003- Neodynamic SRL
http://www.neodynamic.com