对于下载时新打开一窗口下载,下载完后需要关闭的
一种:对于较小文件可以有效:
System.IO.FileInfo file = new System.IO.FileInfo("F:mp3mp3别哭我最爱的人.mp3");
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.Charset="GB2312";
Response.ContentEncoding=System.Text.Encoding.UTF8;
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename="+Server.UrlEncode("别哭我最爱的人.mp3"));
Response.AddHeader("Content-Length", file.Length.ToS...[ 查看全文 ]