日期:2014-05-17  浏览次数:20473 次

用户下载文件后,怎么把这个文件删除?
用户下载文件后,怎么把这个文件删除?
下载文件的代码:
FileInfo file = new FileInfo(reportPath);
            Response.Clear();
            Response.Charset = "GB2312";
            Response.ContentEncoding = System.Text.Encoding.UTF8;
            Response.AddHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(file.Name));
            Response.AddHeader("Content-Length", file.Length.ToString());
            Response.ContentType = "application/x-bittorrent";
            Response.WriteFile(file.FullName);
            Response.End();

------解决方案--------------------
http://blog.csdn.net/lzy_1515/article/details/5538664
看看这个