KA.Barcode for ASP.NET
How to Print Data Matrix in ASP.NET with Valid Data
ASP.NET source code to generate, print Data Matrix images using Barcode Generator for ASP.NET Control
  • Dynamically add, insert Data Matrix to ASP.NET websites/ web pages/ webform
  • Draw Codabar .NET, .NET WinForms EAN 128, ITF-14 .NET WinForms, Intelligent Mail Java & other EAN-13 ASP.NET in .NET IDEs
  • Provide complete tutorials for Data Matrix data encoding in C#, VB.NET programming and IIS
  • Programmatically encode all ASCII characters into Data Matrix barcodes with dynamic data modes
  • Using "~" to specify special characters in the input data for Data Matrix printing
  • Other barcode solutions provided - barcode Java, barcode .NET, barcode ASP.NET, etc.
  • Accurate Data Matrix generation complying with ISO / IEC 16022 (2nd edition)
  • Support Data Matrix with ECC200 error correction setting and GS1-DataMatrix compatibility
  • Professional, mature 2D Data Matrix barcode generating component use word-wide
  • Royalty-free with the purchase of Developer License
KA.Barcode Generator for ASP.NET is a light-weight barcode generating software SDK written completely in C#. Detailed C# and Visual Basic.NET tutorials are provided for making Data Matrix and other 20+ linear & 2d barcode symbologies in ASP.NET web forms/ websites/ web pages, ASP.NET Class, etc. In addition, Microsoft IIS is also supported for barcode generation. KA.Barcode also provides Data Matrix size and image related settings in ASP.NET, IIS:
Data Matrix (ECC200) Bar Code Information
Data Matrix for ASP.NET encodes:
  • ASCII characters: letters A-Z, a-z,digits 0-9, and special characters
Data Matrix for ASP.NET data capacity/length:
  • Numeric data (max): 3,116 characters
  • Alphanumeric data (max): 2,335 characters
  • Byte data (max): 1,555 characters
Data Matrix Data Encoding in KA.Barcode Generator for ASP.NET

Data Matrix Data Encoding with C#, VB.NET Class in ASP.NET

  1. 1.
  2. 2.
    Add reference: Add "KeepAutomation.Barcode.Web.dll" to your ASP.NET project reference
  3. 3.
    Add to toolbox: To add BarcodeControl to your ASP.NET toolbox
Copy the following barcoding program onto you forms to string a Data Matrixi in C#,VB.NET:
using KeepAutomation.Barcode.Bean;
BarCode barcode= new BarCode();
barcode.Symbology= KeepAutomation.Barcode.Symbology.DataMatrix;
barcode.CodeToEncode = "Data Matrix";
Dim barcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

barcode.Symbology= KeepAutomation.Barcode.Symbology.DataMatrix
barcode.CodeToEncode = "Data Matrix"

Encoding Data Matrix with ASCII Mode

Data Matrix barcode generator for ASP.NET encodes mainly ASCII characters 0 - 127 in accordance with ISO/IEC 646. Replace sample code with following one to convert characters into a Data Matrix bidimensional image:
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.ASCII;
barcode.CodeToEncode = "Data-Matrix";
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.ASCII
barcode.CodeToEncode = "Data-Matrix"

Printing Data Matrix with C40 Mode

Data Matrix barcode generator for ASP.NET encodation mainly contains numeric and upper case characters. Replace sample code with following one to transform data into a Data Matrix barcode image:
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.C40;
barcode.CodeToEncode = "DATA123";
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.C40
barcode.CodeToEncode = "DATA123"

Generating Data Matrix with Text Mode

Data Matrix barcode generator for ASP.NET allows users to encode n numeric and lower case characters. Replace sample code with following one:
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.Text;
barcode.CodeToEncode = "2d";
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.Text
barcode.CodeToEncode = "2d"

Creating Data Matrix with X12 Mode

Data Matrix barcode generator for ASP.NET allows users to encode the standard ANSI X12 electronic data interchange characters. Replace sample code with following one to print Data Marix barcodes:
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.X12;
barcode.CodeToEncode = "2DIMENSIONAL";
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.X12
barcode.CodeToEncode = "2DIMENSIONAL"

Drawing Data Matrix with Edifact Mode

Data Matrix barcode generator for ASP.NET allows users to encode 63 ASCII values (values from 32 to 94) plus an Unlatch character (binary 011111). Replace sample code with following one:
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.Edifact;
barcode.CodeToEncode = "2DIMENSIONAL";
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.Edifact
barcode.CodeToEncode = "2DIMENSIONAL"

Streaming Data Matrix with Base256 Mode

Data Matrix barcode generator for ASP.NET allows users to encode 8 bit values. Replace sample code with following one:
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.Base256;
barcode.CodeToEncode = "dbdh";
barcode.DataMatrixDataMode = KeepAutomation.Barcode.DataMatrixDataMode.Base256
barcode.CodeToEncode = "dbdh"

Making Data Matrix with Application Identifier Add-on

Data Matrix barcode generator for ASP.NET supports to GS1 standard for generating Data Matrix barcode with different digit Application Identifiers add-on:
  • ~ai2 = 2 digits
  • ~ai3 = 3 digits
  • ~ai4 = 4 digits
  • ~ai5 = 5 digits
  • ~ai6 = 6 digits
  • ~ai7 = 7 digits
barcode.TildeEnabled = true;
barcode.CodeToEncode = "~ai21234~ai516156468498";
barcode.FNC1 = KeepAutomation.Barcode.FNC1.First;
barcode.TildeEnabled = true
barcode.CodeToEncode = "~ai21234~ai516156468498"
barcode.FNC1 = KeepAutomation.Barcode.FNC1.First;
Data Matrix Data Encoding with drag & drop BarcodeControl
  1. 1.
    In "Choose Toolbox Items" form, click button "Browse...", and select KeepAutomation.Barcode.Web.dll
  2. 2.
    Now you'll see BarCodeControl in your toolbox
  3. 3.
    Drag and drop the BarCodeControl into the Forms and a Codabar image is generated
  4. 4.
    Find barcode setting panel, choose "Symbology" to "DataMatrix"
  5. 5.
    Then input Data Matrix valid character in "CodeToEncode" accordingly
  6. 6.
    You may choose different Data Matrix Data Mode in "DataMatrixDataMode"
  7. 7.
    A Data Matrix barcode with different characters occurs
Data Matrix Data Encoding in Internet Information Service (IIS)
  1. 1.
    Copy folder "barcode" in your download the trial package to your IIS web application folder
  2. 2.
    Create a virtual directory, named "barcode", and link to your just copied "barcode" folder
  3. 3.
    Restart IIS and now you have successfully installed the ASP.NET Barcode Generator web application
  4. 4.
    To test it, open your web browser, and navigate to "http://localhost/barcode/barcode.aspx?symbology=101&code-to-encode=0123456789"
  5. 5.
    A Data Matrix barcode with numeric data will be displayed
Note: In IIS, Symbology.DataMatrix is 101. For different data modes, DataMatrixDataMode.Auto is 0; DataMatrixDataMode.ASCII is 1; DataMatrixDataMode.C40 is 2; DataMatrixDataMode.Text is 3; DataMatrixDataMode.X12 is 4; DataMatrixDataMode.Edifact is 5; and DataMatrixDataMode.Base256 is 6 . Users may write "symbology=101&code-to-encode=xxx" or "symbology=101&datamatrix-data-mode=x&code-to-encode=xxx" accordingly to change encoded data.