WPF中的multiplefileuploading [英] multiplefileuploading in wpf

查看:101
本文介绍了WPF中的multiplefileuploading的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在wpf中上传多个文件?

how to do multiple file uploading in wpf?

推荐答案

这取决于您要上传文件的位置.如果这是HTTP,则还取决于上载页面的期望值.您应该做Web浏览器会做的事情;可以使用System.Net.HttpWebRequest完成.周围有很多代码示例.

参见:
http://stackoverflow.com/questions/5714108/this-code-is-simple-file-upload-how-to-up-upload-multi-files-with-using-this-way-thx [ http://stackoverflow.com/questions/2796084/how-to-带有-httpwebrequest的Simulation-browser-file-upload-with [ ^ ],
http://technet.rapaport.com/Info/LotUpload/SampleCode/Full_Example.aspx [ ^ ].

有关更多信息,请参见:
http://msdn.microsoft.com/en-us/library/system.net. httpwebrequest.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/system.net. webrequest.aspx [ ^ ].

如果要使用FTP上传,请参见 http://msdn.microsoft.com/zh-cn/library/system.net.filewebrequest.aspx [ http://msdn.microsoft.com/en-us/library /ms229715.aspx [ ^ ].

—SA
It depends on where you want to upload the files. If this is HTTP, it also depends on what the upload page expects; you should do what the Web browser would do; and this can be done using System.Net.HttpWebRequest. There are many code samples around.

See:
http://stackoverflow.com/questions/5714108/this-code-is-simple-file-upload-how-to-upload-multi-files-with-using-this-way-thx[^],
http://stackoverflow.com/questions/2796084/how-to-simulate-browser-file-upload-with-httpwebrequest[^],
http://technet.rapaport.com/Info/LotUpload/SampleCode/Full_Example.aspx[^].

For more information, see:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^],
http://msdn.microsoft.com/en-us/library/system.net.webrequest.aspx[^].

If you want to upload using FTP, see also http://msdn.microsoft.com/en-us/library/system.net.filewebrequest.aspx[^].

Remember, to construct System.Net.FileWebRequest or System.Net.HttpWebRequest you need to use the variable of compile-time type System.Net.FileWebRequest as the run-time type is defined by the URI parameter of its factory method Create.

For FTP upload, see this code sample: http://msdn.microsoft.com/en-us/library/ms229715.aspx[^].

—SA


这篇关于WPF中的multiplefileuploading的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆