Using Server.TransferRequest to force download of file to browser
<p>I intend to use ASP.NET <code>Server.TransferRequest</code> to send a file to the browser without the browser knowing the actual path of the file being downloaded. For example, the address <code>download.aspx?id=123</code> should result in the browsers Save dialog popping up.</p>

<p>When I use <code>Server.TransferRequest</code> to "redirect" to, say, a PDF file, the contents of the PDF file is sent to the browser; however, the content is shown in the browser window as - not surprisingly - unintelligible text.</p>

<p>I think there should be some headers attached to the response to force the browser to download the file, but "Content-disposition" header doesn't do the trick.</p>

<p>Any ideas on how to do this?</p>