How not to abort http response c#

前端 未结 8 709
刺人心
刺人心 2020-12-18 03:34

I need to run several methods after sending file to a user for a download. What happens is that after I send a file to a user, response is aborted and I can no longer do any

8条回答
  •  醉酒成梦
    2020-12-18 04:13

    Just remove the context.Response.End(); because you are redirecting anyway...

    The problem is flawed logic here.... Why would you end the response?

    Get the PDF and display a link to it or use a META refresh to redirect to the location of the PDF or you could also display a link or use a combination of both techniques.

提交回复
热议问题