You can use a WebClient to fetch a webpage.
string html;
var req = WebRequest.Create("http://www.codeproject.com") as HttpWebRequest;
var res = (HttpWebResponse)req.GetResponse();
using (var srResponseReader = new StreamReader(res.GetResponseStream()))
{
html = srResponseReader.ReadToEnd();
srResponseReader.Close();
}
res.Dispose();
After you fetch the website you just save the string (containing all the html):
System.IO.File.WriteAllText("c\\file.txt", html);
But if you want to download all the images, scripts, css etc. it's a little more complex.
Convert any URL to a MHTML archive using native .NET code[
^]