地牢速攻无限金牙
31.22 MB · 2026-02-13
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" + filename);
问题是当文件包含空格(例如“abc def”)时,浏览器只接收文件名的“abc”部分.我试过:Server.HtmlEncode但它没有帮助.
你知道如何解决这个问题吗?
PK
将文件名放在引号中: –Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename="" + filename + """);
31.22 MB · 2026-02-13
36.6G · 2026-02-13
108.01M · 2026-02-13