我正在使用以下代码向用户发送PDF以打开/下载。这在IE9中工作正常。有什么想法在Chrome中不起作用吗?
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename= \"" + myFile + "\"");
Response.AddHeader("Content-Length", myFile.Length.ToString());
Response.WriteFile(myFile.FullName);
Response.Flush();
Response.End();
答案 0 :(得分:0)
添加:
Response.ContentType = "application/pdf";