Free Support Forum - aspose.com

Pb with web page refresh after doc generation

Before generating a Word document, I need confirmation from the user. To do so, I use a popup (actually a DIV displayed on top of my main form). This DIV contains a couple of OPTIONS (Yes / No) and a 'OK' button. A click on the button triggers the Word document generation and displays it in a separate Word window... So far, so good... But it should also close the DIV on the web page and I cannot get rid of it. My code looks like this:

- Sub btnLettre_Click()
' Show the confirmation DIV
End Sub

- Sub showConf(pMsg, pRef, pDef)
' Set the confirmation DIV
End Sub

- Sub btnCloseConf_Click()
' Close the confirmation DIV
' Call another sub to save data and display it in separate Word document
End Sub

"divConf.Visible = False" doesn't work no matter where I put it.

I try also to reload the web page after the Word document generation but it seems that all code entered after the "oDoc.Save(xFile, SaveFormat.FormatDocument, SaveType.OpenInWord, Response)" method is ignored.

What should I do?

This is a purely ASP.NET issue and is unrelated to Aspose.Words component.

Please check the following thread where the similar problem was discussed:

http://www.aspose.com/Community/forums/thread/39628.aspx

Maybe you will find it helpful.

Best regards,

The link you provide here is the link of my own message above.

Sorry, here is a correct link:

http://www.aspose.com/Community/forums/thread/39628.aspx

For those who may be interested, I found a way to do it: I wrote the Aspose code in a separate aspx page which is loaded in a IFRAME(width:0px, height:0px in order to open the document in a separate Word window). Thus code in the main web page can still be executed after the Word document generation.

Thanks for your contribution. I am sure many users will find this helpful.

Best regards,