Hi to all, I need to write an application, I don't if it possible, but the application needs to receive and URL address and save the web pages(including its resource).
I explain my self:
1. User insert the address: http://www.yahoo.com, http://www.msn.com, http://www.google.com for example
2. The application will download the web sites, the application will also download all the resources of the web site.
3. In the end the user will have a folder with the html file and its resources
4. The user can view the web site off line without need an internet connection
It's like doing the 'Save Page As...' from thh File->Save Page As...
I need to save a lot of web pages, so I don't want to repeat the save action hundred of times
The application will download the 3 web sites.
I found the code in the MSDN
string remoteUri = "http://www.contoso.com/library/homepage/images/";
string fileName = "ms-banner.gif", myStringWebResource = null;
// Create a new WebClient instance.
WebClient myWebClient = new WebClient();
// Concatenate the domain with the Web resource filename.
myStringWebResource = remoteUri + fileName;
Console.WriteLine("Downloading File \"{0}\" from \"{1}\" .......\n\n", fileName, myStringWebResource);
// Download the Web resource and save it into the current filesystem folder.
myWebClient.DownloadFile(myStringWebResource,fileName);
Console.WriteLine("Successfully Downloaded File \"{0}\" from \"{1}\"", fileName, myStringWebResource);
Console.WriteLine("\nDownloaded file saved in the following file system folder:\n\t" + Application.StartupPath);
The below code can download specificity files, not all the site
Thanks in advanced