标签:
HttpResponse输出文件: Response.Clear(); Response.ContentType = "application/octet-stream"; //通知浏览器下载文件而不是打开 Response.AddHeader("Content-Disposition", "attachment; filename=aaa.csv"); var sw = new StreamWriter(response.OutputStream); //cc.Write<CustomerData>(list, sw, csvFileDesc); sw.Flush(); sw.Close();
HttpRequest获取文件:
var sr = new StreamReader(request.InputStream);
HttpRequest获取文件流,HttpResponse输出文件流
标签:
原文地址:http://www.cnblogs.com/bqh10086/p/4287212.html