Barcode HtmlHelper 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.

Telerik UI for ASP.NET MVC Ninja image

The BarCode is part of Telerik UI for ASP.NET MVC, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Initializing the Barcode

  1. Add the Barcode.

          .Name("barcode") // The name of the Barcode is mandatory. It specifies the "id" attribute of the widget.
          .Value("2346722") // Set the value of the Barcode.
  2. Select the appropriate encoding (symbology) from the available options. Specify it through the encoding method which accepts an enum value.


Functionality and Features

The Barcode supports a set of encoding types.

Referencing Existing Instances

To reference an existing Barcode instance, use the configuration option. Once a reference is established, use the Barcode client-side API to control its behavior.

  // Place the following after the declaration of the Barcode for ASP.NET MVC.
  $(function() {
      // The Name() of the Barcode is used to get its client-side instance.
      var barcode = $("#barcode").data("kendoBarcode");
      barcode.value("foo") // Supply a valid value for that encoding. Then, the Barcode will redraw automatically.

See Also

In this article
Not finding the help you need? Improve this article