Save Open pdf is displayed twice


#1

I'm using a button event from a aspx page to trigger a pdf report. (There are many other buttons on this page). I can generate the report successfully but the problem is,

Open / Save dialog box is being displayed twice. Once I answer the first dialog box, it is displayed again and on answering the second time, report is being saved or opened as per the selection made.

Following is the code used.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim path As String = MapPath(".")

path = path.Substring(0, path.LastIndexOf("\"))

Dim p As Pdf

Dim invoice1 As Invoice = New Invoice(path)

p = invoice1.GetInvoice()

p.Save("risktest.pdf", SaveType.OpenInAcrobat, Response)

Response.End()

End Sub

This is ok during an evaluation time. But wont be good when looking forward to production line.

Please help.

Thanks in advance.


#2

Addition to the above problem

The above problem is only happening when we select 'Open' from the dialogue box. For 'Save' option, dialogue box is not asked twice.


#3

I can’t reproduce this error. I think this problem might be caused by the setting of web browser or Adobe Reader. Can you please try it in another machine?