The following is an example of one way to refresh the parent page from a child popup. First off, you can add the following code on a button of the parent page to send the ID value as a cookie to the popup child page.
Response.Cookies ("ID").Value = TextBox1.Text
Dim sScript As String
sScript = "<script>window.open ('SurveyResults.aspx','','height=300,
width=300, scrollbars=no') ;< /script>"
Response.Write (sScript)
This will open up SurveyResults.aspx page as a popup child page. Then add the following code on the Page.Load event of SurveyResults.aspx page (the popup child page).
Private Sub Page_Load(ByVal sender As System. Object, ByVal e As System.EventArgs)
Handles MyBase.Load
'Put user code to initialize the page here
If Not Page.IsPostBack Then
Dim IDGet As Integer
IDGet = Request.Cookies("ID").Value
//with this IDGet, run the command and fill ds or whatever and then//
Dim cScript As String
cScript = "<script language='javascript'> opener.location.href = 'Survey.aspx'; </script>"
RegisterStartupScript("parentwindow", cScript)
End If
End Sub
To close the popup child page, you can have a button on SurveyResults.aspx page to add the following code.
Private Sub btClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btClose.Click
Response.Write("<script>window.close();</script>")
End Sub
That is all there is to it. I hope you will find this helpful.