Shared Sub GenerateQR(ByVal QRVal As String)
Try
Dim QRCodeEncoder As New QRCodeEncoder
QRCodeEncoder.QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.ALPHA_NUMERIC
QRCodeEncoder.QRCodeScale = 4
QRCodeEncoder.QRCodeVersion = 1
QRCodeEncoder.QRCodeErrorCorrect = Codec.QRCodeEncoder.ERROR_CORRECTION.M
Dim img = QRCodeEncoder.Encode(QRVal)
If Directory.Exists(HttpContext.Current.Server.MapPath("~/QR/")) = False Then MkDir(HttpContext.Current.Server.MapPath("~/QR/"))