I'm a newbie in ASP and ASP .net and I'm trying to display a PDF
file with ADOBE plugin in a ASP .net page.
I always get a message from IE that he wants to open mypage.aspx
then it open with another program. I tried to set all .aspx file extension
to be open with IE but nothing happens..
Here my code :
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
If Page.IsPostBack = False Then
Response.WriteFile("c:\tmp\manual.pdf")
Response.ContentType = "application/pdf"
End If
End Sub
Thanks..
Fabrice
If it still does not work after that , then...
3) Add the following code immediately after the Response.ContentType code:
Response.AddHeader("content-disposition", "attachment; filename=manual.pdf")
Hope this helps.
--
Peter O'Reilly