开发者

How to redirect page after returning FileStreamResult in ASP.NET MVC

We have a reporting feature on our site that allows users to download PDF reports of various data. Some of the reports require parameters, and when this is the case we forward them to a parameter setting view after they choose a report.

After posting the parameters to the server, a FileStreamResult with the PDF is returned. The problem is, that for reports with parameters, the user is left at the parameter setting page after the FileStreamResult is returned. I would like to redirect开发者_开发百科 them back to the reports list page.

Is there anyway to do this with the FileStreamResult, or, should I be looking into a custom solution?


you could set the response redirect headers manually before you feed the file although I'm not sure that would work.

How about redirecting back to a "thanks for downloading" page then start the download?

Simon

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜