Convert.ToBase64String(System.Text.Encoding.Default.GetBytes(lcXml))And, I am using this to do the reverse process:
' Create a file ' expC1 Node ' expC2 File Public Function CreateFile(ByVal tcXML As String, ByVal tcFile As String) As Boolean Dim lcFile As String = "" Dim loByte() As Byte = Nothing Dim loFileStream As System.IO.FileStream = Nothing ' Reset the values cError = "" Try ReDim loByte(tcXML.Length) ' Decode the value loByte = Convert.FromBase64String(tcXML) ' Create the file loFileStream = New System.IO.FileStream(tcFile, System.IO.FileMode.Create) ' Write the file loFileStream.Write(loByte, 0, loByte.Length) ' Close the file loFileStream.Close() Catch loError As Exception cError = loError.Message Return False End Try Return True End FunctionBut, obviously, I do not end up with the same file. So, something is wrong in my process. Anyone would be able to know the proper way to get the file back?