title: Return nothing from Action in ASP.NET MVC
body: <p>I have an ASP.NET MVC form where the user can set criteria, hit the submit button to post, and a file is dynamically generated and returned:</p>
  
  <pre><code>HttpContext.Response.AddHeader("content-disposition", "attachment; filename=Certificates.pdf");
  return File(merged.ToArray(), "application/pdf");
  </code></pre>
  
  <p>This works well because it downloads the file and leave the original form untouched so the user can easily modify the criteria and submit again. In same cases there will be no file to return and I'd like to retain the form's state. How can I do this? I can't redirect back to itself because there's been action submitted already. I can't check client-side before submitting because the logic is server side. Basically I just need to cancel the post.</p>