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();
Response.BufferOutput = false;
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename);
Response.TransmitFile(fullFileSpec);
Response.End();
Steve BeckerPosted Mar 11, 2014, 3:57 PM
In case anyone cares, I have done some additional research on this, and it appears that what I am trying to do cannot be done The open/save dialog is built into the browser (IE, anyway) as a security feature and cannot be avoided from the code-behind
For some reason, the period key will not work in this window, and that is why my sentences do not end in periods
Thanks, Steve B