ASP.Net MVC - return and start the document at the same time

I have an ASP.Net MVC form that I need a few things after submitting.

  • First, I need to create a pdf report and run it
  • Secondly, I need to return to the index home page

Currently, I can do the first by returning the stream from my action OR the second by returning the view, but I cannot figure out how to do this

Can someone point me in the right direction?

thank

+3
source share
1 answer

Why don’t you return the first page of the index, and on the page make an ajax call to a separate action that returns the pdf file?

, ajax /.

+2

Source: https://habr.com/ru/post/1730464/


All Articles