private Sub GenerateQR(Val As String,QRname As String)
'Val is the QR string,
'QRname is the qr generated image name, we need that to delete if exists
Dim img As String = File.Combine(Main.AssetFolder, "qrlogin")
Dim generate As ZXing
generate.Initialize
File.Delete(img, $"${QRname}.png"$)
generate.QrCode(Val, 256, File.Combine(img, $"${QRname}.png"$), "png")
'set HTML of image <dev> on page
Dim Html As String = $"<img id="qrimg" src="${QRname}.png" title="qrcode" width="256" height="256"/>
<style > #qrimg {
margin-top: 5px;
border: 1px solid #CCC;
border-radius: 1em;
}
</style>
"$
devqrcodeimg.SetHtml(Html)
ws.Flush
End Sub