Groups | Blog | Home
all groups > asp.net > february 2005 >

asp.net : Reload Parent page


chuayl
2/20/2005 10:45:02 PM
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
Nikander & Margriet Bruggeman
2/20/2005 11:47:01 PM
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

[quoted text, click to view]
Riki
2/21/2005 10:24:31 AM
[quoted text, click to view]

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

--

Riki

AddThis Social Bookmark Button