Hello All
Im trying to get html saved to a text file after the Url has been entered into a text box Im having difficulties with this can anyone help. I have no problem saving text to a text file and reading text from a file.


have you tried using the WebClient class to stream the html from the URL?

I am not a VB guy but in C# looks like this:

System.Net.WebClient client = null;
client = new System.Net.WebClient();
client.Encoding = Encoding.UTF8;
client.Headers = new System.Net.WebHeaderCollection();
client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2;)");
string html = client.DownloadString(txtDomain.Text + url);
AddPageToDB(txtDomain.Text + url, html);
catch {//error handling code here}