子窗口刷新父窗口时回发 [英] Postback when child window is refreshing the parent window

查看:67
本文介绍了子窗口刷新父窗口时回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

当子窗口关闭时,我需要刷新父窗口.而我做到了. (当我单击 Show 按钮时,我将获得此子窗口.)

现在,问题是,我有一个网格,当页面在父窗口中加载时将被加载.

如果我将其排序,然后单击显示按钮.现在,我得到了子窗口,当我关闭子窗口时,我的父窗口正在刷新.由于这个原因,我的网格也再次填充.

我保留下面的内容,该内容显示为false,并且断点进入if条件.

Hi folks,

I need to refresh parent window when child window is closing. And I did that. ( I will get this child window when I click on Show button.)

Now, the problem is, I have a grid, which will be loaded when the page loads in my parent window.

If I sort it and click on Show button. Now I got the child window and when I am closing the child window my parent window is getting refreshed. And due to which my grid also filled again.

And I kept the below and which is showing as false and the breakpoint is entering into the if condition.

If Not IsPostBack Then

End If



请帮助我.

在此先感谢您.



Please help me in this.

Thanks in advance.

推荐答案

您可以通过JavaScript进行操作.

看一下这篇文章: Partial在子窗口关闭时通过AJAX(ASP.NET 2.0)更新父页面-有条件 [
You can do it via JavaScript.

Have a look at this article: Partial update of parent page via AJAX (ASP.NET 2.0) on close of a child window - conditionally[^]
This is a C# sample but will give you full detail and how things happen.


这篇关于子窗口刷新父窗口时回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆