How to show a message and send a file using ASP.NET

后端 未结 2 1184
猫巷女王i
猫巷女王i 2021-01-21 13:41

I generate a set of letters in a file, but if there are errors then the file may be incomplete. I want to send the file anyway, but with a warning to the user. So I have this:

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-21 14:13

    You can't return HTML and another response (for file's stream) in single GET.

    You can return HTML and have link to download file there.

提交回复
热议问题