How to return a FileResult AND RedirectToAction in

2019-09-04 14:02发布

问题:

I have an Action that returns a FileResult via View(...). This works well.

Ideally I would like to be able to somehow return a file and then redirect to another action (or somehow do both simultaneously).

Is this possible?

回答1:

It could be done by a javascript code in client side which run after download started, you can see the pattern in many website, most notably Microsoft download center.