Edit this page

QRCode HtmlHelper Overview

The QRCode HtmlHelper extension is a server-side wrapper for the Kendo UI QRCode widget.

Configuration

  1. Add a QRCode.

    Example
        @(Html.Kendo().QRCode()
            .Name("qrMail") //The name of the QRcode is mandatory. It specifies the "id" attribute of the widget.
            .Value("mailto:clientservice@telerik.com") // Set the value of the QRCode.
            .Color("#e15613")
            .Background("transparent")
            .Size(120)
         )
    
  2. Choose the appropriate correction level and/or encoding.

        @(Html.Kendo().QRCode()
                  .Name("qrcode")
                  .ErrorCorrection(QRErrorCorrectionLevel.H)
                  .Encoding(QREncoding.ISO_8859_1)
                  .Value("foo")
        )
    

Reference

Existing Instances

To reference an existing Kendo UI QRCode instance, use the jQuery.data() configuration option. Once a reference is established, use the QRCode API to control its behavior.

Example
  //Put this after your Kendo QRCode for ASP.NET MVC declaration.
  <script>
  $(function() {
      //Notice that the Name() of the QRCode is used to get its client-side instance.
      var qrcode = $("#qrcode").data("kendoQRCode");
  });
  </script>

See Also