First, the code that i´m using:
Code://Get url contents HttpWebRequest hRequest = ((HttpWebRequest)WebRequest.Create(url)); hRequest.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:18.104.22.168) Gecko/2008092417 Firefox/3.0.3"; HttpWebResponse resp = (HttpWebResponse)hRequest.GetResponse(); //Read contents and output into a textbox StreamReader reader = new StreamReader(resp.GetResponseStream()); string res = reader.ReadToEnd().ToString(); reader.Close(); textBox1.Text = res;
The problem is when i see html source into the textbox it appears bad formatted, dont know if each line of a texbox has a limit of characters and this is why it jumps to another line or what happens.
I set the wordwrap property of the textbox to false and added both scrolls bars, but it still bad formatted.
Can someone help me?
Thanks in advance.