I'm trying to save a webpage to an htm file using C# and HttpWebRequest.
It does work, but it does not save all the data. (As oppose to opening the page in a browser and selecting and saving page complete)
How can I do this programmatically? I'm trying to avoid having to ShellExecute IE or Firefox and then sending it PostMessages to save the page.
I'm on a WindowsXP system, and will take suggestions for either IE or Firefox.
HttpWebRequest WebRequestObject = (HttpWebRequest)HttpWebRequest.Create(url);
WebResponse Response = WebRequestObject.GetResponse();
Stream WebStream = Response.GetResponseStream();
StreamReader Reader = new StreamReader(WebStream);
string PageContent = Reader.ReadToEnd();