如何编写从服务器到客户端PC的下载文件
问题描述:
嗨
我目前有一个文件,我创建并存储在应用程序运行的服务器上。
我想要要知道我可以使用哪些代码让用户通过单击按钮来下载文件?
Hi
I currently have a file that i create and gets stored on the server where the application runs.
I would like to know how what code can i use for the user to download the file by clicking a button?
答
你可以使用WebClient.DownloadFile
更多信息请查看这个
http://msdn.microsoft.com/en-us/library/ez801hhe%28v=vs.110%29.aspx [ ^ ]
you can use WebClient.DownloadFile
for more info check this
http://msdn.microsoft.com/en-us/library/ez801hhe%28v=vs.110%29.aspx[^]