回覆列表
  • 1 # 使用者2292948274874

    FileInfo info = new FileInfo(filePath); long fileSize = info.Length; Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachement;filename=" + fileName); //指定檔案大小 Response.AddHeader("Content-Length", fileSize.ToString()); Response.WriteFile(filePath, 0, fileSize); Response.Flush(); Response.Close(); filepath為你剛次上傳的檔案路徑,fileName為檔名字,不懂可以再交流

  • 中秋節和大豐收的關聯?
  • 導購員工一個星期的工作總結怎麼寫?