Reload Parent page

G

Guest

i have a page, "parent.aspx" , which will open a new Child Window
"child.aspx" . user will enter some text on the child window.

Would like to know how to refresh the parent page at the same parent window,
after the user click on "OK" button. when press on "OK " button, the child
window will do some processing and close
 
G

Guest

You have to do this with JavaScript. Do something like this in the child
window:

<script>
window.opener.location = "mylocation.htm";
</script>

Kind regards,
Nikander & Margriet Bruggeman
 
R

Riki

chuayl said:
i have a page, "parent.aspx" , which will open a new Child Window
"child.aspx" . user will enter some text on the child window.

Would like to know how to refresh the parent page at the same parent
window, after the user click on "OK" button. when press on "OK "
button, the child window will do some processing and close

After processing, insert this code (VB.NET):

'Form the script that is to be registered at client side.
Dim scriptString as String = "<script language=JavaScript>"
scriptString += "window.opener.location.href=window.opener.location.href;<"
scriptString += "/"
scriptString += "script>"
If(Not IsClientScriptBlockRegistered("clientScript"))
Page.RegisterStartupScript("clientScript", scriptString)
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top