return both a file and a rendered view in an MVC3 Controller action

后端 未结 3 1970
遥遥无期
遥遥无期 2020-12-17 03:36

is it possible to both return a file for download and update a view from a controller method call?

or a workaround is needed, maybe using javascript (calling a refre

3条回答
  •  一向
    一向 (楼主)
    2020-12-17 04:15

    While it is not possible to return a FileResult alongside a ViewResult, you could use a meta refresh on the returned view to redirect to the file once the page loads.

    
    

提交回复
热议问题