网友说是:
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "filename=" + fileName);
Response.BinaryWrite(fileContent);
(本人暂未测试)。
我的项目的使用的是:
context.Response.ContentType = "image/jpeg";
context.Response.Cache.SetCacheability(HttpCacheability.Public);
context.Response.BufferOutput = true;
测试成功,没有任何问题。