请大家帮忙给一个c#的例子 我只需要上传文件 谢谢了
解决方案 »
- 列表ArrayList
- C# WinForm 读取 tif 格式图片问题。
- 查询oracle数据库出现not all variables bound的问题
- C# 如何根据数据库中条件显示文件夹下对应的图片?
- 怎么把数据库的数据绑定到teechart?
- 为什么paragraph设置了ToolTip,但是把鼠标移动到段落上,ToolTip却没有显示?
- 各位大哥,帮帮小妹,毕业设计,急
- 求一个有效的C#正则表达式匹配超链接的URI部分
- C#如何能得到当前所在网段的所有Sql Server的服务器名称?多谢
- 在ASP.NET中怎么把上传的文件进行压缩?
- 多线程处理业务请求,怎么把处理结果写入到文件里?总是报有进程打开文件
- C#连结数据库报错
String uriString = Console.ReadLine();// Create a new WebClient instance.
WebClient myWebClient = new WebClient();Console.WriteLine("\nPlease enter the fully qualified path of the file to be uploaded to the URL");
string fileName = Console.ReadLine();Console.WriteLine("Uploading {0} to {1} ...",fileName,uriString);
// Upload the file to the URL using the HTTP 1.0 POST.
byte[] responseArray = myWebClient.UploadFile(uriString,"POST",fileName);// Decode and display the response.
Console.WriteLine("\nResponse Received.The contents of the file uploaded are: \n{0}",Encoding.ASCII.GetString(responseArray));