rushikeshl
November 1st, 2004, 06:41 PM
Hello,
I need to convert a Base64 encoded byte array to an ASCII string so that it can be displayed to the user. There are a whole lot of VB.NET functions to do that but none of them is converting the data successfully. All of them convert the data partly and return the other part as Base64 encoded. I think it might have to do something with the carriage return character embedded in the data. But, I am not quite sure on that. Does any one have a quick code for converting a byte array to an ASCII string ?
Thanks,
Rushi
Here's what I am using:
Dim arrByteErrors() As Byte
arrByteErrors = GetBase64Data()
Dim sData As String = System.Text.ASCIIEncoding.ASCII.GetString(arrByteErrors)
TextBox1.Text = sData
I need to convert a Base64 encoded byte array to an ASCII string so that it can be displayed to the user. There are a whole lot of VB.NET functions to do that but none of them is converting the data successfully. All of them convert the data partly and return the other part as Base64 encoded. I think it might have to do something with the carriage return character embedded in the data. But, I am not quite sure on that. Does any one have a quick code for converting a byte array to an ASCII string ?
Thanks,
Rushi
Here's what I am using:
Dim arrByteErrors() As Byte
arrByteErrors = GetBase64Data()
Dim sData As String = System.Text.ASCIIEncoding.ASCII.GetString(arrByteErrors)
TextBox1.Text = sData