1
Answer

Avoiding the Open/Save dialogue

Steve Becker

Steve Becker

10y
794
1

On an ASP.NET page, I am successfully displaying a PDF file in a separate browser window using the code shown below. However, the user is presented with a dialogue asking whether the file show be opened or saved. Is there a way to bypass the dialogue and just display the file in the new window?

Thanks in advance, Steve B

>>> CODE SAMPLE
 
Response.Clear();
Response.BufferOutput = false;
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename);
Response.TransmitFile(fullFileSpec);
Response.End();
 
Answers (1)
Next Recommended Forum