Hi Everyone… Downloading any type of file using http request is not a big at all using either C# or Visual Basic.NET code. Please follow the steps:
1. You need to add an reference
using System.Net; 2. Now you can use the class named as WebClient, so just declare an object of this class and intialize using 0 argumnet constructor.
WebClinet myClient = new WebClient ();
3. Now you can use the method DownloadFile of WebClient class to start downloading the file.
//myClient.DownloadFile (<Http Address>,<Local Path>)
string httpAddress = http://msdn2.microsoft.com/en-us/library/system.net.webclient.downloadfile(vs.71).aspx;
string localPath = “C:\myDownload”;
myClient.DownloadFile (httpAddress, localPath);
4. Thats it…change the httpAddress of your desired file and localPatth.
Keep Smiling 🙂