当我使用:
WebClient web = new WebClient();
web.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChangedWeb);
web.DownloadFileAsync(new Uri("http://www.website.com/Webs.exe"),
Environment.SpecialFolder.Desktop + @"\Webs.exe");
...没有下载。
但是,如果我将其更改为“
WebClient web = new WebClient();
web.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChangedWeb);
web.DownloadFileAsync(new Uri("http://www.website.com/Webs.exe"),
Environment.SpecialFolder.Desktop + "Webs.exe");
然后它下载,但我得到一个名为“desktopWebs.exe”的文件。那么如何将文件保存到桌面呢?
谢谢