摘要: 方式一:TransmitFile实现下载。将指定的文件直接写入 HTTP 响应输出流,而不在内存中缓冲该文件。 protectedvoidButton1_Click(objectsender,EventArgse){/*微软为Response对象提供了一个新的方法TransmitFile来解决使用Response.BinaryWrite下载超过400mb的文件时导致Aspnet_wp.exe进程回收而无法成功下载的问题。代码如下:*/Response.ContentType="application/x-zip-compressed";Response.AddHeader( 阅读全文
posted @ 2012-09-18 16:48 楼上少年 阅读(251) 评论(0) 推荐(0) 编辑