日期:2014-05-20  浏览次数:20817 次

winform 如何上传文件到指定url,或者iis里面
快不行了,救命啊

------解决方案--------------------
1、通过HTTPXML把文件post到某一个网页,该网页负责接收并保存数据
2、在服务器端作一个webserivice,winform里面直接调用相应方法
------解决方案--------------------
this.fildUpload.PostedFile.SaveAs(System.Web.HttpContext.Current.Request.MapPath(GetPath()) + GetName()); //上传

private string GetPath()
{
return upName = "../../Upload/ "; //存放的服务器路径
}
private string GetName()
{
//构造文件的名字,以防重复
}

手写的,没编译,你试试吧~
------解决方案--------------------
http://dotnet.aspx.cc/article/6381bd5f-51f3-4339-4239-1328564a1b2a/read.aspx