我想从 ASP.net 保存/打开一个文件。
if (Request.Browser.Browser == "IE" && (Request.Browser.Version == "7.0" || Request.Browser.Version == "8.0" || Request.Browser.Version == "9.0"))
contentDisposition = "inline; filename=" + Uri.EscapeDataString(fileName);
else
contentDisposition = "inline; filename*=UTF-8''" + Uri.EscapeDataString(fileName);
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.Charset = "UTF-8";
Response.ContentType = "application/" + mimeType;
Response.AppendHeader("content-disposition", contentDisposition + "." + extension);
使用此示例 áéáá asd.pdf,我得到以下 áéáá%20asd.pdf。我想要一个简单的空间,而不是 %20。