$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
How to Put up Barcode Types Using C#
Home > How to > Barcode Types

Kettic UI C# ASP.NET AJAX Barcode SDK is mature enough to be used to automatically create barcode directly from a numeric or character data. It supports following barcode images based on several standards, also, you can go to the barcode type overview page to get the overall information for all the compatible barcode and sub-barcode sumbolys.
Supportable 1D barcode symbols: Codabar, Code 11, Code 128 (Code128A, Code128B and Code128C), Code 25 Interleaved, Code 25 Standard, Code 39, Code 93, EAN 13, EAN 8, MSI (most common MSImod10, MSImod1010, MSImod11 and MSImod1110), Postnet, UPC-A, UPC-E, UPC Supplement 2 and UPC Supplement 5.
Supportable 2D barcode symbol: QR Code
In following texts, we will demonstrate how to create a user-defined barcode as well as how to customize the created barcode within C#.NET application, including setting certain barcode type, barcode data, barcode text font and barcode bar width.

How to Create and Specify Barcode with C# Codes

Before we can directly use following C# sample codes to set and customize barcode, we need to create an AJAX C#.NET barcode creating project at first. We can do like this: drag an "AjaxPanel" item from Toolbox to "aspx" file at first, and then drag a barcode control to added "AjaxPanel" object.

How to Set Barcode Type Using C#

After have added the barcode creating control,we can add following c# sample codes to “aspx.cs” file to choose and set barcode typ. Here we demonstrate how to set code128 barcode symbol, and we can change to other supported linear barcode types, such as Code 39, Code 93, Code 11, EAN 8, EAN 13 and so on so forth.
PerBarcode1.Type = BarcodeType.Code128;

How to Set Barcode Data Using C#

Use barcode "Text" property to set available barcode data value. See following C# demo code. Note here, different barcode type can encode different data characters, we need to be familiar with the encodable data.
PerBarcode1.Text = "12345678";

How to Set Barcode Text Font Using C#

Use "TextFont" attribute to set required barcode text font, like Arial, 9f, Fontstyle.Regular. You can directly copy and paste following C# demo code to your barcode creating project, and of course, you can have necessary modifications.
PerBarcode1.Font.Size = newFontUnit(16);

How to Set Barcode Bar Width Using C#

Refer to following C# sample code to set barcode bar width.
PerBarcode1.LineWidth = 4;