Download files from http Url – c#

By Using WebClient Constructor  to download data from a server and display it on the system console, to download data from a server and write it to a file, and to upload form values to a server and receive the response.

MSDN Link :

http://msdn.microsoft.com/en-us/library/system.net.webclient.webclient.aspx

http://msdn.microsoft.com/en-us/library/system.net.webclient.credentials.aspx

static void Main(string[] args)
{

WebClient Client = new WebClient ();
Client.DownloadFile(“http://creativecommons.org/images/deed/seal.png”, @”C:\myfolder\myimage.png”);

}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s