Last active
October 22, 2015 20:22
-
-
Save bjoerntx/de404407d8bef20c207e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// save the document as PDF in a session variable | |
byte[] data; | |
TextControl1.SaveText(out data, | |
TXTextControl.Web.BinaryStreamType.AdobePDF); | |
Session["document"] = data; | |
// create a new IFRAME and call this ASPX with QueryString | |
// to load document from session data | |
ScriptManager.RegisterClientScriptBlock( | |
this.Page, | |
this.Page.GetType(), | |
"alert", | |
"var iframe = document.createElement('iframe');" + | |
"iframe.src = 'index.aspx?download=1';" + | |
"iframe.style.display = 'none';" + | |
"document.body.appendChild(iframe);", | |
true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment