Below is the code I added and it didn't update the parent but displayed the following message:
EventTarget: PostBackFromChilWindow
EventArgument:
If you don't want the message, remove or comment out this line in the parent:
Me.Response.Write(argumentList)
Why is the EventArgument blank? Could that be why the parent is NOT getting updated?
The EventArgument is blank because you're sending an empty string as the second argument to __doPostBack here:
opener.__doPostBack('PostBackFromChildWindow', '');
'Child Window
<body onunload= "DoParentRefresh()" >
function
DoParentRefresh()
{
//opener.location.href=opener.location.href;
opener.__doPostBack('PostBackFromChildWindow', '');
}
'Parent Window
The parent is NOT getting updated because you are not doing anything here but writing the arguments sent to the screen.
Sub Page_Load(Source as Object, E as EventArgs)
ClientScript.GetPostBackEventReference(Me, String.Empty)
If Me.IsPostBack Then
Dim eventTarget As Object = Me.Request("__EVENTTARGET")
Dim eventArgument As Object = Me.Request("__EVENTARGUMENT")
If Not (eventTarget Is Nothing) AndAlso Not (eventArgument Is Nothing) AndAlso eventTarget.ToString().Trim() = "PostBackFromChildWindow" Then
Dim argumentList As String = "eventTarget: " + eventTarget.ToString().Trim() + "<br>" + "eventArgument: " + eventArgument.ToString().Trim() + "<br>"
Me.Response.Write(argumentList)
' *** UPDATE YOUR PAGE HERE ***
End If
End If
End Sub
NC...