KA.Barcode for ASP.NET
How to Generate Data Matrix Image in ASP.NET Projects
ASP.NET source code to generate, print Data Matrix in different files using Barcode for ASP.NET Control
  • Simple integration into .NET Framework and Microsoft Visual Studio 2005/2008/2010
  • Simple to integrate, add Data Matrix bar code capabilities to ASP.NET websites/ webform/ web pages
  • Implementing dynamic barcodes, like VB.NET EAN-8, UPC-E C#, ASP.NET EAN-8, ASP.NET Interleaved 2 of 5 in your projects
  • Provide complete tutorials to make, print Data Matrix images in C#, VB.NET and IIS
  • Provide flexible barcode setting options to customize Data Matrix image size, rotation, color,etc
  • Make and output Data Matrix images for string and save locally into gif, jpeg, png, tiff, and bitmap files
  • Accurate Data Matrix generation complying with ISO / IEC 16022 (2nd edition) for displaying in ASP.NET webform
  • Embedding dynamic linear & 2D barcodes, such as ISBN Java, Code 128 Word, EAN-8 .NET WinForms, Excel Data Matrix, in your applications
  • Support GS1 system compatible Data Matrix picture to be created in ASP.NET website
  • Royalty-free, perpetual license with source code provided
Data Matrix barcode maker addin SDK API for ASP.NET is a best barcoding functionality of KA.Barcode Generator for ASP.NET, which is a mature, reliable barcode generating component for making Data Matrix and other 20+ linear & 2D barcodes according to barcode specifications. Here's C#, VB.NET sample code as well as URL parameters for Data Matrix image settings in ASP.NET; Data Matrix data and size related demo codings are also provided in:
Data Matrix Image Setting with C#, VB.NET Class in ASP.NET

Install Data Matrix Barcode Maker Control into ASP.NET Projects

  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 C# or VB.NET barcode onto you projects to insert, produce a Data Matrix in ASP.NET webform/ web page:
using KeepAutomation.Barcode.Bean;
BarCode barcode= new BarCode();
barcode.Symbology= KeepAutomation.Barcode.Symbology.DataMatrix;
barcode.CodeToEncode = "Data Matrix";
barcode.generateBarcodeToImageFile("C://barcode-datamatrix-csharp.gif");
Dim barcode As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

barcode.Symbology= KeepAutomation.Barcode.Symbology.DataMatrix
barcode.CodeToEncode = "Data Matrix"
barcode.generateBarcodeToImageFile("C://barcode-datamatrix-vbnet.gif")

Change Data Matrix Barcode Image Resolution

KA.Barcode Generator for ASP.NET is used to display high quality barcode images in Window Applications. The default resolution of Data Matrix generated by KA.Barcode Generator for ASP.NET is 72 DPI. DPI is short for Dots per Inch.

Append Several Data Matrix Barcodes into a Structured One

KA.Barcode Generator for ASP.NET allows up to 16 Data Matrix symbols to be reconstructed into a structured format without data information to lose. Users may enable "GroupEnabled" function, and use "GroupItemId" to count the total number of Data Matrix and use "GroupItemCount" to number Data Matrix symbols (Note: it starts with 0). Remember, all the symbols should use the same Group ID.
First Segement:
barcode.GroupEnabled = true;
barcode.GroupId = 23;
barcode.GroupItemCount = 2;
barcode.GroupItemId = 0;

Second Segement:
barcode.GroupEnabled = true;
barcode.GroupId = 23;
barcode.GroupItemCount = 2;
barcode.GroupItemId = 1;
First Segement:
barcode.GroupEnabled = true
barcode.GroupId = 23
barcode.GroupItemCount = 2
barcode.GroupItemId = 0

Second Segement:
barcode.GroupEnabled = true
barcode.GroupId = 23
barcode.GroupItemCount = 2
barcode.GroupItemId = 1

Adjust Data Matrix Barcode Image format

KA.Barcode Generator for ASP.NET supports most major image format, like GIF, TIFF, JPEG/JPG, BMP, PNG, to save Data Matrix barcode image in your ASP.NET applications. User may change image format within "ImageFormat". The default is "Gif".
barcode.BarAlignment = AlignmentHori.Center;
barcode.BarAlignment = AlignmentHori.Center
Data Matrix Image Setting 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.
    Choose "Symbology" to "DataMatrix"
  5. 5.
    Set "ImageFormat" to "Gif", and then a Data Matrix with customized image occurs
Data Matrix Image Setting 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&fore-color=gray&back-color=darkred&image-format=gif"
  5. 5.
    A Data Matrix barcode with numeric data will be displayed
  6. 6.
    If you want to barcode embed in HTML or ASP scripts as an image, insert the <IMG> tag: <img src"http://localhost/barcode/barcode.aspx?symbology=101&code-to-encode=0123456789&fore-color=gray&back-color=darkred&image-format=gif" />