I\'ve got a controller action that downloads a dynamically generated file:
public ActionResult DownloadFile()
{
var obj = new MyClass { MyStr
As Ross has said, you can only return one response to a HTTP request. What i do in that case is:
RedirectToAction()
(POST, REDIRECT, GET pattern)window.location.href
property to an special download action which sends the file back to the browser