Author: RamiShareef | Posted on: 12/9/2009 9:23:32 AM | Views : 331

Hi,
I tried to convert an HTML content to byte array but I got this error
Invalid character in a Base-64 string.
System.Net.WebRequest webRequest = WebRequest.Create(url); System.Net.WebResponse webResponse = webRequest.GetResponse(); System.IO.StreamReader sr = new StreamReader(webResponse.GetResponseStream(), System.Text.Encoding.GetEncoding("UTF-8")); content = sr.ReadToEnd(); content = System.Web.HttpUtility.UrlEncode(content); byte[] b = Convert.FromBase64String(content);

how to get rid of the invalids chars ??
thank you.




...

Go to the complete details ...