Robert
New member
Hi,
for a Web-Application i need to display pdf-files in a browser using
Response.Clear()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(DokData) or
Response.WriteFile(FilePath)
Response.End()
the File is displayed but when I want to save the file from the browser to the lokal disk in the save-dialog the filename is not correct. Instead its the name of the aspx-page with the pdf-extension (e.g. myASPXPage.pdf).
Its found that its possible to force a download by adding
Response.AppendHeader("Content-Disposition", "attachment; filename=myPDFFile.pdf")
but i need to display the file...
How can i get the correct filename into the save-dialog?
Thanks for your help!
for a Web-Application i need to display pdf-files in a browser using
Response.Clear()
Response.ClearHeaders()
Response.ContentType = "application/pdf"
Response.BinaryWrite(DokData) or
Response.WriteFile(FilePath)
Response.End()
the File is displayed but when I want to save the file from the browser to the lokal disk in the save-dialog the filename is not correct. Instead its the name of the aspx-page with the pdf-extension (e.g. myASPXPage.pdf).
Its found that its possible to force a download by adding
Response.AppendHeader("Content-Disposition", "attachment; filename=myPDFFile.pdf")
but i need to display the file...
How can i get the correct filename into the save-dialog?
Thanks for your help!