Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# ASP.NET
How can i refresh a parent page when a popupwindow load has completed in ASP.NET...?
Posted 13-Dec-12 4:44am
aspnet_regiis -i at 13-Dec-12 9:45am
Not possible.. The popup window does not know who his parent is ....
Member 9581488 at 13-Dec-12 9:49am
On popup Body Onload=="jsFunction()"
window.onload = refreshParentPage;
function refreshParentPage() {
I am not 100% sure but You can try the above function.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

<pre lang="cs">string Script = "window.parent.location=window.parent.parent.location;";
        ClientScript.RegisterClientScriptBlock(typeof(Page), "Close", Script, true);
use the above if you are calling aspx page in the popup
or simply use
<script language="javascript">
function closeandrefresh()
call the above function when the close event is called.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

i use this
Response.Write("<script language="javascript">")
Saneesh PK at 13-Dec-12 10:31am
Thanks for the reply....It is getting executed..I have given a breakpoint on the parent page load event...but it is not hitting...that means the page is not refreshing
FehPorto at 13-Dec-12 10:46am
you used the code "refresh" when they need to refresh the page back?
Show me your code to see where the code is being called.
And the page_load of your page

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

  Print Answers RSS
0 Peter Leow 160
1 Mika Wendelius 156
2 Abhinav S 155
3 TheRealSteveJudge 139
4 Dave Kreskowiak 125
0 Sergey Alexandrovich Kryukov 8,513
1 OriginalGriff 6,526
2 Peter Leow 3,727
3 Zoltán Zörgő 3,426
4 Richard MacCutchan 2,417

Advertise | Privacy | Mobile
Web04 | 2.8.150123.1 | Last Updated 13 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100