title: jQuery post with FileStreamResult as return value
body: <p>I'm quite new with jquery and asp.net mvc. My problem is that I'm calling a method in a controller that returns a FileStreamResult. This is working fine, but when I'm calling it with the jQuery post it doesn't work. I can see with vs debug tool that the progam is exectuting the method. Therefor I think it has something to do with that my jQuery call should take care of the return parameter? Somenoe?</p>
  
  <p>The jQuery code:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      function createPPT() {
              $.post("&lt;%= Url.Action( "DownloadAsPowerpoint", "RightMenu" )%&gt;");
      }
      &lt;/script&gt;
  </code></pre>
  
  <p>The method in the controller:</p>
  
  <pre><code>    public ActionResult DownloadAsPowerpoint()
      {
          Stream stream; 
          //...
          HttpContext.Response.AddHeader("content-disposition", "attachment; filename=presentation.pptx");
  
          return new FileStreamResult(stream, "application/pptx");
      }
  </code></pre>
  
  <p>Could someone explain and give me some example code?</p>