Hi,
This has been a challenging problem to troubleshoot.
I have a page on which I render a diagram. That works fine.
I am displaying one activity for a process with several activities.
The user clicks on a button that causes ALL activities (not just the current one they are looking at) to be exported to a PDF document.
When this code completes, the user is prompted to Open or Save the document (actual dialog varies by browser).
So, here's my problem.
The export works fine, but the diagram that was on the screen prior to the export button being clicked sometimes disappears. I modified the code behind to regenerate the diagram and that seems to have made things better, but I still have instances when the diagram does not appear - just white space.
It would be rather difficult to create a simple project that demonstrates this issue, so I've provided a summary of what happens below:
Export To PDF Button clicked
...
// The following will cause a script to run after this ajax request completes that results in the ViewAttachments page to be loaded
// This page in turn will transmit the newly created document to the browser
RadAjaxPanel MstrPanel1 = (RadAjaxPanel)Master.FindControl("MstrPanel1");
MstrPanel1.ResponseScripts.Add(String.Format(@"window.location.href = ""{0}"";", "ViewAttachments.aspx?Path=ExternalDocs&Delete=No"));
...
A PDF including ALL activities for the current process is created
- multiple diagrams are created, saved as PDF and then these PDF's merged into a single document
...
The diagram originally displayed is regenerated
...
The code behind is complete
...
The response script registered above will now cause page ViewAttachmenets.aspx to be loaded.
The Page_Load in this page will transmit the file to the browser:
...
Response.TransmitFile(path + Session["Attachment"].ToString());
This seems to be working fine in Chrome and FireFox but not IE (versions 7 thru 9).
Any thoughts on how I might fix this, or get a better handle on what is happening?
Thanks in advance.
Jim