Steve Becker

Steve Becker

  • NA
  • 14
  • 0

Avoiding the Open/Save dialogue

Mar 6 2014 7:19 PM

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)