title: Forces to prompt download box IE
body: <p>I'm having a problem with some reports in the application I'm doing manutention</p>
  
  <p>I've a button that does a postback to the server and do some information and then get back to the cliente and open a popup to download the report.</p>
  
  <pre><code>    private void grid_ItemCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
  {
   ...
   ClientScript.RegisterClientScriptBlock(this.GetType(), "xxx", "&lt;script&gt;javascript:window.location('xx.aspx?m=x','xxx','width=750,height=350,directories=no,location=no,menubar=no,scrollbars,status=no,toolbar=no,resizable=yes,left=50,top=50');&lt;/script&gt;");
  }
  </code></pre>
  
  <p>Then in xxx.aspx I've the code:</p>
  
  <pre><code> Response.ClearContent();
   Response.ClearHeaders();
   Response.TransmitFile(tempFileName);
   Response.Flush();
   Response.Close();
  
   File.Delete(tempFileName);
  
   Response.End();
  </code></pre>
  
  <p>This works fine if IE option <em>Automatic prompting for file downloads</em> is enabled. But by default this is disabled and I need to force the download box to be prompting.</p>
  
  <p>Can I do anything without change a lot of code? </p>
  
  <p>Thanks.</p>