title: Download file from controller RedirectToAction()
body: <p>I have an old MVC 1.0 application that I am struggling with something relatively simple. </p>
  
  <ol>
  <li>I have a view that allows the user to upload a file.</li>
  <li>Some server side processing goes on.</li>
  <li>Finally, a new file is generated and downloads automatically to the client's machine.</li>
  </ol>
  
  <p>I have steps 1 and 2 working. I can not get the final step to work. Here is my controller:</p>
  
  <pre><code>[AcceptVerbs(HttpVerbs.Post)]
  public ViewResult SomeImporter(HttpPostedFileBase attachment, FormCollection formCollection, string submitButton, string fileName
  {
      if (submitButton.Equals("Import"))
      {
          byte[] fileBytes = ImportData(fileName, new CompanyExcelColumnData());
          if (fileBytes != null)
          {
              RedirectToAction("DownloadFile", "ControllerName", new { fileBytes = fileBytes});
          }
          return View();
      }
      throw new ArgumentException("Value not valid", "submitButton");
  }
  
  public FileContentResult DownloadFile(byte[] fileBytes)
  {
      return File(
                  fileBytes,
                  "application/ms-excel",
                  string.Format("Filexyz {0}", DateTime.Now.ToString("yyyyMMdd HHmm")));
  }
  </code></pre>
  
  <p>The code executes:</p>
  
  <pre><code>RedirectToAction("DownloadFile", "ControllerName", new { fileBytes = fileBytes});
  </code></pre>
  
  <p>but the file does not download. Suggestions welcome and thanks in advance.</p>