winform客户端上传图片或文件到web服务器
System.Net.WebClient myWebClient = new System.Net.WebClient();//声明变量
//rweb路径 = "http://localhost:1473/servfilechuli.ashx"网络路径
//rweb路径 = "http://localhost:1473/servfilechuli.ashx?xxx=xxx&zzz=zzz..."网络路径带参 myWebClient.UploadFile("web路径可以带参数", "POST","本地文件路径")
//上面调用就结束了,后面的处理就是web上的了
context.Response.ContentType = "text/plain";
string strMethod = context.Request["Method"].ToString().Trim();
object objFanHuiZhi = ""; string strFanHui
共有 0 条评论