摘要: <input type="file" name="xxxxxxx"/>必须有“name”属性,否则在后台代码中用Request.Files是取不到值的 后台读取文件代码: HttpFileCollection httpFileCollection = HttpContext.Current.Requ 阅读全文
posted @ 2017-04-14 16:10 (john_zhang) 阅读(4401) 评论(0) 推荐(0)
摘要: //把本地文件信息读入数据流中 FileStream stream = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite); StreamReader reader = new StreamReader( 阅读全文
posted @ 2017-04-14 15:25 (john_zhang) 阅读(1263) 评论(0) 推荐(0)
摘要: 导出文件: string filePath = Server.UrlDecode(filePath); if (File.Exists(filePath)) { FileInfo fi = new FileInfo(filePath); Response.Clear(); Response.Clea 阅读全文
posted @ 2017-04-14 15:22 (john_zhang) 阅读(372) 评论(0) 推荐(0)