Hi guys, what i'm trying to do this this. Simply create a C# windows app that when that when i point it to a website will download the HTML code. Kind of like when you use IE and you choose view source. Any starting point would be great.
A:
You could create a wrapper around wget, which already does all the heavy lifting.
Keltex
2010-03-30 20:25:56
While this is a possible solution, .NET provides very clean methods to perform the task the OP wants to do via WebClient.
TheHurt
2010-03-30 20:29:16
+3
A:
You probably want to look into HttpWebRequest in .NET.
WebClient may be another class for you to explore.
It provides an HTTP specific implementation of WebRequest which can be used to download HTML (or any other content, really) using the HTTP protocol.
LBushkin
2010-03-30 20:25:59
A:
You should look for HttpWebRequest class. You can use it for making requests. Also take a look on a ready-made solution Watin
Hun1Ahpu
2010-03-30 20:26:41
+2
A:
Have you looked into the WebClient class?
using(WebClient webClient = new WebClient())
{
string html = webClient.DownloadString("http://www.someurl.com");
}
tdaines
2010-03-30 20:28:39