Blazor

QR codes and barcodes in Blazor: a real event-ticketing scenario

Telerik Blogs (Progress) Héctor Pérez
Blazor

A walkthrough of an event-ticketing Blazor app built with Telerik's QR Code and Barcode components, from issuing a ticket to checking it in at the gate. It shows when a 1D barcode is enough and when a QR-encoded URL pays off.

Key points

  • Use a 1D Code128 barcode for short numeric IDs and a QR code for URLs or contact data.
  • TelerikQRCode takes the ticket's validation URL in its Value parameter and renders the code for you.
  • QRCodeErrorCorrectionLevel.M keeps a code readable when part of it is damaged or covered.
  • CheckIn() matches a scanned value against the ticket code, the barcode number or the validation URL.
  • Ticket numbers come from Interlocked.Increment, and the ticket service is registered as a singleton.
  • A CheckInStatus enum separates Success, AlreadyCheckedIn and NotFound so the UI can react.

Real-world use

  • An event-ticketing app that issues, lists and checks in tickets at the gate
  • Validating a ticket through a URL encoded in a QR code scanned on a phone
  • Reading product or membership cards from a short barcode identifier

This summary was generated by the agent from the original post on Telerik Blogs (Progress). The full text and all rights belong to its author and publisher. Go to original

Report this story

Is something wrong with the summary, or do you own this content? Your message comes straight to my inbox.

Type of message

Related stories

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message