看板 C_Sharp 關於我們 聯絡資訊
各位好 我在 aspx 有個 button button click後 在 CodeBehind 執行 Response.BinaryWrite 下載檔案,大致上如下 https://ithelp.ithome.com.tw/articles/10127947 我想在檔案下載完成後 在前端執行一個handler 請問有辦法透過註冊事件來偵測到 下載完成嗎? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.139.1.193 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/C_Sharp/M.1673244810.A.7B8.html
testPtt: WebClient.DownloadFileCompleted 01/09 14:48
不好意思 上面那個link有點誤導 我檔案來源不是某個Uri 所以WebClient好像不太可行 這個link為例好像比較好 https://blog.miniasp.com/post/2008/04/19/ASPNET-Force-Download-File-and-deal-with-Chinese-Filename-correctly 我想要在前端註冊某個handler 得以在 Response.End 結束時 做一些事 javascript 有辦法偵測到 Response.End 結束嗎? 謝謝 ※ 編輯: kisha024 (42.77.138.181 臺灣), 01/10/2023 17:21:52