Response.AddHeader attachment doesn't work
<p>here's the code I have:</p>

<pre><code>                Response.Clear();
                Response.AddHeader("content-disposition", "attachment;  filename=file.xlsx");
                Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                Response.BinaryWrite(pck.GetAsByteArray());
                Response.End();
</code></pre>

<p>The problem is that when this code is run (On button click) I do not a file for download in my browser (tried in Chrome \ IE).</p>

<p>pck is an excel file (Generated with <a href="http://epplus.codeplex.com/" rel="nofollow">epplus</a> library).
I don't even know how to debug this part of the code. it's doing nothing.</p>

<p>Here's the error I'm getting in my browser:</p>

<blockquote>
  <p>Uncaught Sys.WebForms.PageRequestManagerParserErrorException:
  Sys.WebForms.PageRequestManagerParserErrorException: The message
  received from the server could not be parsed. Common causes for this
  error are when the response is modified by calls to Response.Write(),
  response filters, HttpModules, or server trace is enabled.</p>
  
  <p>Details: Error parsing near 'PKX��@ϖ�'.</p>
</blockquote>
