Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- string url = @"http://dl2.soft98.ir/soft/NET.Framework.4.5.50709.x86-x64.rar";
- // Create an instance of WebClient
- WebClient client = new WebClient();
- // Hookup DownloadFileCompleted Event
- client.DownloadFileCompleted +=
- new AsyncCompletedEventHandler(client_DownloadFileCompleted);
- // Start the download and copy the file to c:temp
- client.DownloadFileAsync(new Uri(url), @"c:frame.zip");
- }
- void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
- {
- MessageBox.Show("File downloaded");
- }
- private void button1_Click(object sender, EventArgs e)
- {
- string url = @"http://www.persiajonoub.net/soft/NET.Framework.4.5.50709.x86-x64.rar";
- // Create an instance of WebClient
- WebClient client = new WebClient();
- // Hookup DownloadFileCompleted Event
- client.DownloadFileCompleted +=
- new AsyncCompletedEventHandler(client_DownloadFileCompleted);
- // Start the download and copy the file to c:temp
- client.DownloadFileAsync(new Uri(url), @"c:frame.zip");
- }
- void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
- {
- MessageBox.Show("File downloaded");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement