Link to home
Start Free TrialLog in
Avatar of Craig Beamson
Craig BeamsonFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Ajax ModalPopupExtender / iFrame - button to run some code, close the popup and rebind a dropdown on the parent

I am trying to use an AjaxControlTookit ModalPopupExtender for the first  time.
A button on the parent page displays an asp.panel which contains an iFrame whose source is another aspx page.

When the user has finished with the popup, I'd like there to be button which:
1) causes some codebehind to write values to my database
2) closes the popup (equivalent to the "CancelControlID" button click action)
3) rebinds a dropdown on the parent page.

I can do 1) with a button on the child page firing codebehind.
I'm pretty sure I can do 2 and 3) with a button on the parent page mapped to the CancelControlID of the PopupExtender.

How can I do 1), 2) and 3)  with one button and which page does it need to be on?
Ideally, I'd prefer to do a partial page refresh of the parent page and just update the dropdown - there's a lot of delicate Ajax and Javascript stuff there which might otherwise be affected by a premature full postback of the page.
ASKER CERTIFIED SOLUTION
Avatar of Ramkisan Jagtap
Ramkisan Jagtap
Flag of Finland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Craig Beamson

ASKER

That does the trick.  The key was knowing about the windows.opener class as a means of referencing the parent page.