title: Submitting form and pass data to controller method of type FileStreamResult
body: <p>I have an mvc form (made from a model) which when submitted, I want to get a parameter
  I have the code to set the form and get the parameter</p>
  
  <pre><code>using (@Html.BeginForm("myMethod", "Home", FormMethod.Get, new { id = @item.JobId })){
  }
  </code></pre>
  
  <p>and inside my home controller I have</p>
  
  <pre><code>    [HttpPost]
      public FileStreamResult myMethod(string id)
      {
           sting str = id;
  
      }
  </code></pre>
  
  <p>However, I always get the error</p>
  
  <blockquote>
    <p>The resource you are looking for (or one of its dependencies) could
    have been removed, had its name changed, or is temporarily
    unavailable.  Please review the following URL and make sure that it is
    spelled correctly.</p>
  </blockquote>
  
  <p>When I omit the <code>[HttpPost]</code>, the code executes file but the variables <code>str</code> and <code>id</code> are null. 
  How can I fix this please?</p>
  
  <p>EDIT</p>
  
  <p>Can this be caused because myMethod in the controller is not an ActionResult? I realized that when I have a method of type Actionresult where the method is bound to a view, everything works well. But the type FileStreamresult cannot be bound to a View. How can I pass data to such methods?</p>