代码如下:fileProcessingNotice.SaveAs(Server.MapPath("~/FileUpload/") + fileProcessingNotice.FileName);
iput1.Value = Server.MapPath("~/FileUpload/") + fileProcessingNotice.FileName;FileInfo fi = new FileInfo(iput1.Value);
if (fi.Exists)
{
FileInfo DownloadFile = new FileInfo(iput1.Value);
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment;filename=" + Server.UrlDecode(DownloadFile.Name));
Response.AppendHeader("Contnet-Length", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
iput1.Value = Server.MapPath("~/FileUpload/") + fileProcessingNotice.FileName;FileInfo fi = new FileInfo(iput1.Value);
if (fi.Exists)
{
FileInfo DownloadFile = new FileInfo(iput1.Value);
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment;filename=" + Server.UrlDecode(DownloadFile.Name));
Response.AppendHeader("Contnet-Length", DownloadFile.Length.ToString());
Response.WriteFile(DownloadFile.FullName);
Response.Flush();
HttpContext.Current.ApplicationInstance.CompleteRequest();
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货