Free Support Forum - aspose.com

Closing window after dialog appears

When I create a ppt a blank aspx page opens. Once the page is done running the save dialog appears and I can choose open, save or cancel. I have always been able to select save or open, select a place to save it if saving and have the aspx close automatically when the ppt starts.
It no longer seems to do that and I am left with a blank aspx page after closing the MS PPT.
Is this a change in aspose.powerpoint ? Is there a way I can close this window once the open/save has started so that once done with the ppt I do not have a blank window staring at me.

Any help is appreciated
Thanks
Ray

Hello Ray,
I’m not sure I understood your question correctly. Do you mean blank page appears in browser after you downloading ppt-file? If so, maybe you updated your browser, installed some download manager or changed its settings. To make page close, maybe your service should return presentation as attachment in http file which saves it and then closes page using javascript?

I have it setup in my application that a user clicks a button to run my powerpoint generator.
When the button is clicked a new aspx page opens but since i capture the response when the powerpoint is generated the page stays blank.
Now when the response returns it gives me the dialog to open , save or cancel.
If i choose open the powerpoint will then open in MS PowerPoint.
When I close MS Powerpoint the original aspx page that generated my ppt is still open.

My question is how to close that orignal aspx page either after the ppt is done downloading or when the open save cancel dialog appears.
I thought in earlier versions that aspose.powerpoint did this as I have never had code to close the page but it always happened.
Is there a way to close the page like this?
Thanks
Ray

I use this code to return the ppt to the browser



Dim file As String = DateTime.Now.ToString(“yyyyMMddHHmmss”) & “ppt.ppt”
Me.Response.ContentType = “application/vnd.ms-powerpoint”
Me.Response.AppendHeader(“Content-Disposition”, “attachment; filename=” & file)
Me.Response.Flush()
Dim st As System.IO.Stream = Me.Response.OutputStream
j5cppt.pres.Write(st)
Me.Response.End()


As far as I know, there is no standards which regulate such behavior. You can try to play with some exotic http abilities, such as multipart (MIME) response, but I am not sure if it will work.
Usually empty browser window stay when opening nonhtml content in new browser window. Maybe you should access to .aspx via link from some html page?