ASP.NET MVC Barcode Overview
The Telerik UI Barcode HtmlHelper for ASP.NET MVC is a server-side wrapper for the Kendo UI Barcode widget.
The Barcode represents data in a machine-readable format.
To see the component in action, check the examples:
Initializing the Barcode
The following example demonstrates how to define the Barcode.
Razor
@(Html.Kendo().Barcode()
.Name("barcode")
Basic Configuration
To configure the Barcode, pass the configuration options as attributes:
-
The name of the Barcode is mandatory. It specifies the "id" attribute of the widget.
-
You can select the appropriate encoding (symbology) from the available options. Specify it by passing an
enum
value to the encoding method.
Razor
@(Html.Kendo().Barcode()
.Name("barcode")
.Value("10110110")
.Encoding(BarcodeSymbology.Code128)
.Width(200)
.Height(100)
.Border(border => border.Color("red").Width(2)))
)
Functionality and Features
The Barcode supports a set of encoding types