title: Response.BinaryWrite() not working in a modal popup window
body: <p>I'm working on a SharePoint application where I output a PDF content to the browser so that the user can save the PDF. But it is working when I do a <code>Response.Redirect()</code> but not when I open the same page in a new popup window using SharePoint's CommonShowModalDialog().</p>
  
  <p>If I redirect to <a href="http://test/pdfoutput.aspx" rel="nofollow">http://test/pdfoutput.aspx</a> where I've written the <code>BinaryWrite()</code> code it is working fine.</p>
  
  <p>But if I open the page using SharePoint's Modal dialog I'm getting the page to be opened in the pop up correctly and the code is getting executed without any exceptions while debugging. But I'm not getting the save dialog.</p>
  
  <pre><code>Same page -&gt; Response.Redirect() - works
            -&gt; CommonShowModalDialog() - Fails
  </code></pre>
  
  <p>Any ideas?</p>