Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

ASP .net refresh parent window

Posted on 2004-08-19
6
2,099 Views
Last Modified: 2008-01-09
Dear experts,

In the parent form, I have a html control:
<INPUT onclick="window.open('/frmSOP_SM_UAC.aspx','SMUAC','width=500, height=650, resizable=yes,toolbar=no,menubar=no,location=no')"
type="button" value="Add/ Revise Manager Data">

that opens another page in a separate window( the child window).
How to refresh the content of the parent window by clicking on a button on the child form?

Thanks for helping

etalexit.
0
Comment
Question by:etalexit
  • 3
  • 2
6 Comments
 
LVL 1

Assisted Solution

by:John-Doe
John-Doe earned 100 total points
ID: 11846410
Do opener.location.reload(); in a function or ie put this in the code of the opened window:

<input type="button" onClick="opener.location.reload();">

BR,
  -JD
0
 

Author Comment

by:etalexit
ID: 11846689
But this only applies to html control. How about web control?
0
 

Author Comment

by:etalexit
ID: 11851199
I put the code in the unload method for the page
<body onunload="opener.location.reload();">

When I close the browser, it dosen't seem to reload the parent window. ( I put a break point in the page_load method and it is not stepping in)
Any ideas?
0
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
LVL 9

Expert Comment

by:riyasjef
ID: 11851206
Hi

reload() fn display a "page refresh window" if there is a "form submit" in the parent window...

So it is better to use...


<input type="button" onClick="opener.location.href=opener.location.href;">

or

<input type="button" onClick="opener.location.replace(opener.location);">

0
 

Author Comment

by:etalexit
ID: 11851256
Ok, I got it, I should put it under the onbeforeunload event instead of onunload.
http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20707549.html?query=javascript+onunload+not+&clearTAFilter=true
0
 
LVL 9

Accepted Solution

by:
riyasjef earned 400 total points
ID: 11851264

<asp:button runat="server" onServerClick="testFn" />


Then try this....

<script language="C#" runat="server">

     void testFn()
     {
           String str="opener.location.href=opener.location.href";
           RegisterClientScriptBolck("test",str);
     
     }
      
</script>




0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Angular2 app not loading Bootstrap properly 4 69
move widget title down 4 25
paypal ipn url 5 79
Designing forms 3 17
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question