Function showing output to textbox vb.net

Good Day, I'm using visualstudio2019, and I have function like this:

Sub doQR()
    Dim SallerName As String = gethexstring(1, "Bobs Records")
    Dim VATReg As String = gethexstring(2, "310122393500003")
    Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
    Dim TotalAmt As String = gethexstring(4, "10000.00")
    Dim VatAmt As String = gethexstring(5, "150.00")
    Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
    Console.WriteLine(decString)
    Console.WriteLine(HexToBase64(decString))
    Console.Read()
End Sub

I want to show the output in a textbox (output.text)

Thanks,


Try this:

Sub doQR()
     Dim SallerName As String = gethexstring(1, "Bobs Records")
     Dim VATReg As String = gethexstring(2, "310122393500003")
     Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
     Dim TotalAmt As String = gethexstring(4, "10000.00")
     Dim VatAmt As String = gethexstring(5, "150.00")
     Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
     Console.WriteLine(decString)
     Console.WriteLine(HexToBase64(decString))
     Console.Read()

     output.text = HexToBase64(decString)
End Sub

Or if you want to just show decString, then replace this line:

output.text = HexToBase64(decString)

With:

output.text = decString

Put it in a TextBox

Sub doQR()
    Dim SallerName As String = gethexstring(1, "Bobs Records")
    Dim VATReg As String = gethexstring(2, "310122393500003")
    Dim DateTimeStr As String = gethexstring(3, "2022-04-25T15:30:00Z")
    Dim TotalAmt As String = gethexstring(4, "10000.00")
    Dim VatAmt As String = gethexstring(5, "150.00")
    Dim decString As String = SallerName & VATReg & DateTimeStr & TotalAmt & VatAmt
    Console.WriteLine(decString)
    Console.WriteLine(HexToBase64(decString))
    Console.Read()
    ' do this
    TextBox1.Text = decString
End Sub