I’ll try to download file using this code.But file size is 0 KB.What is the correct and efficiency way to download the file.
private void DownloadFile()
{
using (WebClient Client = new WebClient())
{
Client.DownloadFileAsync(
new Uri("http://localhost/sn/userSelect.Designer.cs", UriKind.Absolute),
@"C:\xampp\htdocs\sn\test1.txt");
Client.Dispose();
}
}
Any one can give me the method for download the file over windows form program in C#.thanks
1 Answer