.net - View PDF file within ASPX not acrobat -


When a user clicks on a link, it opens a new window (after target = "_ blank" ) Calls a xyz.ASPX page that will dynamically create a PDF invoice, save it in the database (not a physical location), and then I should be able to open PDF file inside the ASPX page.

What's happening now is that ASPX generates a PSD file, it does its stuff, but then the invoice opens to Acrobat to display the PDF However, the xyz.aspx page is empty And does not display anything. I do not like it and I want xyz.aspx to display the pdf file.

From my research, it seems that if you want to display PDFs within the ASPX page, you need an IFrame or custom control. However, because PDF is dynamically created and not stored on disk, how can I set the source for iFrame? Is there a way to set source as a response object or some other in-memory object?

Is there an easy way to do this? I do not want to use custom controls. I am using .NET 3.5 and C # along with master pages and CSS themes, but I have disabled it for this page.

Sources xyz.aspx:

` Content Type =" App / PDF "CodeVihink =" Expose CSX "AutoEventWireUp =" True "Inheritance =" Namespace 1 .xyz "%>

' xyz.aspx. Cs (receives PDF file from db and then writes the response object)

  protected zeros Page_load (object sender, eventArgse E) {byte] PDFBarfile = gate PDA Failafdimdi (Peediaiaidi); If (pdfBinaryFile! = Faucet) response. BinaryWrite (pdfBinaryFile);  

}

view in custom handler (.asx files) and answer.

Though on some of the Edoda waves, I do not think their plugins perform well in iframes. One thing I will see is the display of PDF, rather than an HTML preview, and then there is a link so that users can download the actual PDF. It would be a very sensible way to do this, because without Acrobat, people are going to get a good "Download PDF" box no matter if its in the IFrame or not (Note that I call Acrobat. Pass PDF reader but there is no PDF reader plugin for their browser), such as for PDF download, you only need a custom HTML handler which you Programming should tell it to a query string that they want to download what PDF. (And thus, the disc will not need to write a PDF)


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -