views:

14

answers:

0

I have a ModalPopupExtender that houses an iFrame. The iFrame loads a form and on successful submission of a form I show another ModalPopupExtended (a "Success" dialog). When the user clicks ok, I want to close the modal popup containing the iFrame.

I'm using an event handler delegate to call a function in the iFrame content page's codebehind when the OK button is clicked.

window.Close() closes the iFrame, but not host window

window.Parent.Close() closes everything

window.Top.Close() closes everything

My thinking is that I need to get a reference to the ModalPopupExtender housing the iFrame and call it's .Close() method, but I haven't been about to do this.