This code works perfectly for me:
Response.ContentType="application/pdf";
Response.AddHeader( "content-disposition","attachment; filename=filename);
FileStream sourceFile = new FileStream("C:\\PDFs\\" + filename,
FileMode.Open);
long FileSize;
FileSize = sourceFile.Length;
byte[] getContent = new byte[(int)FileSize];
sourceFile.Read(getContent, 0, (int)sourceFile.Length);
sourceFile.Close();
Response.BinaryWrite(getContent);
-IFS
"Dave" <no****@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
I have a Crystal reports export that throws the exported pdf file into a
folder c:\reports. The export works fine, but now I need to redirect the
user to that report. Can you please tell me how I can do that?
Thanks,
-Dave