Results 1 to 6 of 6

Thread: How to open PDF in Reader rather than download file

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2021
    Posts
    23

    How to open PDF in Reader rather than download file

    I've inherited a VB.net application that uses a button click to open PDF files stored on a server. I want the PDF to open in Adobe Reader, but the following code downloads the file instead. How can I open it in Reader?

    Code:
    ...
    
    Response.Buffer = False
    Response.Clear()
    Response.ClearContent()
    Response.ClearHeaders()
    Response.ContentType = "application/pdf"
    Response.AddHeader("Content-disposition", "attachment; filename=" & name)
    Response.TransmitFile("c:\12345.pdf")
    Response.End()
    Last edited by Rhodo; Dec 2nd, 2021 at 02:27 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width