Refresh partial parent page on closing popup in

On click of button a popup window open. In the child window I made some changes and when I save, popup need to be closed and partial parent page refreshed like a single updatepanel.

I don’t want complete parent page refresh.


You have to trigger the event that refreshes the target update panel from the popup. One way of doing this is using the window.opener element.

Here is a simple example of code in a popup that you can adapt for your project. Note you'll need to change 'btnTriggersUpdate' to the ClientID that is given to whatever Button triggers the Update Panel refresh.

<asp:Button runat="server" ID="btnRefreshParentUpdatePanel" OnClientClick="window.opener.document.getElementById('btnTriggersUpdate').click();" Text="Refresh Parent Update Panel" />

In my example, here is the Update Panel in the parent:

<asp:UpdatePanel ID="upnTarget" runat="server">
        <asp:Label id="lblUpdatePanelLabel" runat="server" Text="Not Updated"></asp:Label>
        <asp:Button ID="btnTriggersUpdate" runat="server" Text="Refreshes Update Panel" />

Parent's btnTriggerUpdate_Click to prove it updates:

Protected Sub btnTriggersUpdate_Click(sender As Object, e As EventArgs) Handles btnTriggersUpdate.Click
    lblUpdatePanelLabel.Text = "Updated"
End Sub 

Need Your Help

EntityManager.getReference does it always return the same instance within a session?

session object jpa reference entitymanager

My question concerns EntityManager.getReference. Given that I am in one JPA session, can I be sure that for two calls to EntityManager.getReference for the same entity and the same primary key I al...

Google Earth - Set Time Slider to Maximum Values

date time slider kml google-earth

I have created a Google Earth map with a Master KML file that links to 500+ individual KMLs. I have included a time slider so that the user can filter on start and end dates.