ASP.Net如何从弹出窗口更新主页面中的updatePanel?

时间:2010-07-28 18:16:31

标签: c# javascript asp.net ajax updatepanel

希望得到帮助,谢谢你提前。我有两个页面的aspx,第一个是主页面包含一个updatepanel,我在其中将第二个页面称为弹出窗口。我需要一种方法来从弹出窗口更新updatepanel(在主页面中)。

谢谢你的宝贵帮助。

我在javascript中调用popup:

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;

    };

2 个答案:

答案 0 :(得分:0)

将UpdatePanel的ClientID传递给弹出窗口。然后从您的codebehind或javascript中调用update()。

答案 1 :(得分:0)

我刚才写了一些关于如何从弹出窗口调用父窗口代码的内容。看看它是否有帮助。

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