C# 文件上传下载

上传者: arctoby | 上传时间: 2021-05-24 14:32:41 | 文件大小: 5.44MB | 文件类型: ZIP
C#文件上传下载 使用WebClient的UploadFileAsync、UploadFile、DownloadFile、DownloadFileAsync方法,异步调用服务器上传下载数据。 带源码及解决方案 // 创建WebClient实例 WebClient myWebClient = new WebClient(); //访问权限设置       myWebClient.Credentials = redentialCache.DefaultCredentials; //要上传的文件 FileStream fs = new FileStream(fileNamePath, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); try{...}catch{...}

文件下载

资源详情

[{"title":"( 26 个子文件 5.44MB ) C# 文件上传下载","children":[{"title":"FileUpAndDown","children":[{"title":"WebApplication1.suo <span style='color:#111;'> 30.00KB </span>","children":null,"spread":false},{"title":"WebApplication1","children":[{"title":"FileUpAndDown.Publish.xml <span style='color:#111;'> 58B </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"FileUpAndDown.dll <span style='color:#111;'> 9.00KB </span>","children":null,"spread":false},{"title":"FileUpAndDown.pdb <span style='color:#111;'> 65.50KB </span>","children":null,"spread":false},{"title":"Interop.THUNDERAGENTLib.dll <span style='color:#111;'> 14.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"Default.aspx <span style='color:#111;'> 4.10KB </span>","children":null,"spread":false},{"title":"FileUpDown","children":null,"spread":false},{"title":"Web.config <span style='color:#111;'> 7.80KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"FileUpAndDown.dll <span style='color:#111;'> 9.00KB </span>","children":null,"spread":false},{"title":"FileUpAndDown.csproj.ResolveComReference.cache <span style='color:#111;'> 734B </span>","children":null,"spread":false},{"title":"FileUpAndDown.pdb <span style='color:#111;'> 65.50KB </span>","children":null,"spread":false},{"title":"Interop.THUNDERAGENTLib.dll <span style='color:#111;'> 14.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.09KB </span>","children":null,"spread":false},{"title":"TempPE","children":null,"spread":false},{"title":"FileUpAndDown.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.85KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Web.Debug.config <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"Default.aspx.designer.cs <span style='color:#111;'> 3.14KB </span>","children":null,"spread":false},{"title":"App_Data","children":[{"title":"ASPNETDB.MDF <span style='color:#111;'> 10.00MB </span>","children":null,"spread":false},{"title":"aspnetdb_log.ldf <span style='color:#111;'> 504.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"FileUpAndDown.csproj.user <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false},{"title":"Web.Release.config <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"FileUpAndDown.csproj <span style='color:#111;'> 4.81KB </span>","children":null,"spread":false},{"title":"Scripts","children":[{"title":"jquery-1.4.1.js <span style='color:#111;'> 164.84KB </span>","children":null,"spread":false},{"title":"jquery-1.4.1-vsdoc.js <span style='color:#111;'> 234.21KB </span>","children":null,"spread":false},{"title":"jquery-1.4.1.min.js <span style='color:#111;'> 70.24KB </span>","children":null,"spread":false}],"spread":false},{"title":"donwFile","children":null,"spread":false},{"title":"Service References","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false}],"spread":false},{"title":"Default.aspx.cs <span style='color:#111;'> 14.40KB </span>","children":null,"spread":false}],"spread":false},{"title":"WebApplication1.sln <span style='color:#111;'> 931B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • ai520gou :
    还不错的,可以借鉴参考,但是太深入的基本没有了。
    2019-11-19
  • mason辘轳 :
    可以实现功能
    2018-11-05
  • 妙为 :
    经典的c#例子,非常好的资料,值得学习
    2018-01-31
  • yuanwq1 :
    帮助我解决了问题 谢啦
    2017-10-14
  • liukang1644 :
    不好用,不能用啊,什么
    2016-05-09

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明