FileInfo fileInfo = new FileInfo(filePath);
            HttpContext.Current.Response.Clear(); //清除服务器中缓冲的输出
            HttpContext.Current.Response.ClearContent();
            HttpContext.Current.Response.ClearHeaders();
            HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" +      System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));//解决中文乱码
            HttpContext.Current.Response.AddHeader("Content-Length", fileInfo.Length.ToString());
            HttpContext.Current.Response.AddHeader("Content-Transfer-Encoding", "binary");
            HttpContext.Current.Response.ContentType = "audio/x-mpeg";
            HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8");
            HttpContext.Current.Response.WriteFile(fileInfo.FullName);
            HttpContext.Current.Response.Flush(); //立即发送缓冲的输出
            HttpContext.Current.Response.End();
            File.Delete(filePath);上面是串下载文件的代码能下载。。
但是。怎么能下载之后就把源文件删除掉呢
向上面的写法。。file.del写于其后,file.del是不会执行的,因为已经response.end了,方法会直接结束。。
但是file.del插在其他地方的话,下载有不好使了。。