[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

ASP .net refresh parent window

Posted on 2004-08-19
6
Medium Priority
?
2,115 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
[X]
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
  • 3
  • 2
6 Comments
 
LVL 1

Assisted Solution

by:John-Doe
John-Doe earned 300 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 1200 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

656 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