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.