views:

29

answers:

2

Hi, want somme help, thank you by advance. I've two page aspx, the first is the main page containe an updatepanel in which I call the second page as popup. I need a way for update the updatepanel (in main page) from the popup.

Thank you for you precious help.

I call popup as this follow in javascript:

this.showUrl = function(url) {

     if (!this.div) {
      this.create();
     }
     else {
      this.div.style.display = '';
      this.hideDiv.style.display = '';
     }
     DayPilot2.ModalStatic = this;

     this.iframe.src = url;

    };
A: 

Pass the ClientID of the UpdatePanel to the popup. Then call update() from your codebehind or javascript.

MCain
how can I pass the ClientID of updatepanel to the popup? by JS or C#? a simpe example will be appreciate. thk you!
Here's how you get the ID in the page: <%=updatepanelname.ClientID%>
MCain
I know how get clientID, but how to pass this ClientId to the popup? And how I handle the updatePanel from popup?thk you!
If it's an aspx page, you could use the session object to pass the id or even the querystring. The javascript call is __doPostBack('panel1', ''); If you can't get it to work that way, try putting a button on the main page that calls __doPostBack. Then, call that button from your popup through javascript.
MCain
A: 

I wrote something a while ago on how to call parent window's code behind from pop up window. See if it helps.

http://www.codeproject.com/KB/aspnet/sample.aspx

David