.net 输出文件到客户端并删除

来源:互联网 发布:程序员客栈官网招聘 编辑:程序博客网 时间:2024/05/18 06:31

        ' 输出副本的二进制字节流         Response.ContentType = "application/ms-excel"        Response.AppendHeader("Content-Disposition", "attachment;filename=info.xls")        Response.BinaryWrite(File.ReadAllBytes("filePath"))        ' 删除副本         File.Delete(filePath)


原创粉丝点击