QRCode HtmlHelper Overview

The Telerik UI QRCode HtmlHelper for ASP.NET Core is a server-side wrapper for the Kendo UI QRCode widget.

The QRCode generates Canvas and Scalable Vector Graphics (SVG) images that represent Quick Response (QR) codes.

QR codes take a piece of information from a transitory media, place it into the cell phone, and enable the cell phone to quickly read these generated images. All graphics are rendered on the client by using Canvas or SVG.

Initializing the QRCode

  1. Add the QRCode.

        @(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. Select the appropriate correction level and encoding (symbology).

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

Functionality and Features

The QRCode supports a set of encoding conventions.

Referencing Existing Instances

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

// Place the following after the declaration of the QRCode for ASP.NET Core.
<script>
    $(function() {
        // The Name() of the QRCode is used to get its client-side instance.
        var qrcode = $("#qrcode").data("kendoQRCode");
    });
</script>

See Also

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