Response.Clear();
if (DownType == 0)
Response.ContentType = "application/octet-stream";
else
Response.ContentType = "image/bmp";
Response.AddHeader("Content-Disposition", "attachment; filename=" +
HttpUtility.UrlEncode(vBlobInfo.FileName, Encoding.UTF8));
byte[] fileBuffer = vBlobInfo.Data;
Response.OutputStream.Write(fileBuffer, 0, fileBuffer.Length);
Response.End();
上面是我的原代码,下载文件时,保存没有任何问题,但是打开时,进入word或其他什么的提示文件无法找到文件
if (DownType == 0)
Response.ContentType = "application/octet-stream";
else
Response.ContentType = "image/bmp";
Response.AddHeader("Content-Disposition", "attachment; filename=" +
HttpUtility.UrlEncode(vBlobInfo.FileName, Encoding.UTF8));
byte[] fileBuffer = vBlobInfo.Data;
Response.OutputStream.Write(fileBuffer, 0, fileBuffer.Length);
Response.End();
上面是我的原代码,下载文件时,保存没有任何问题,但是打开时,进入word或其他什么的提示文件无法找到文件
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货