Click here to Skip to main content
15,922,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,

I have a link button on click of which a child window gets opened. User enters some details in the Gridview of child window.
On closing the child window(browser close), i want to refresh the parent page or do some action.

But I am unable to get where to use this unload method as child window is having the master page.

Please provide the related code.. Please help.

Thanks and regards
swathi reddy
Updated 4-Jun-10 1:05am

Share this answer
Basic idea is you need to refresh parent page when child window is closed.

I also stuck in the same problem few days before and after lots of RND i found the solution.

On child page:
In button click event
<asp:button id="btn2" runat="server" causesvalidation="False" text="Send Value" onclientclick="passValues(); window.close()" xmlns:asp="#unknown">

add script on the page

function passValues() {
window.opener.document.getElementById('ctl00$ContentPlaceHolder1$text1').value = document.getElementById('&lt;%=txtvname.ClientID &gt;;').value;

It works great for me !
Happy Coding :-D
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900