Dear all,
I can use this code to write a value in parent window control.

StrJScript = "<SCRIPT>parent.document.forms[0].TxtCustomerId.value = '" & ClearSpace(Row.Cells(1).Text.Trim) & "';</SCRIPT>"
        If Not ClientScript.IsClientScriptBlockRegistered("S1") Then
            ClientScript.RegisterClientScriptBlock(Me.GetType(), "S1", StrJScript)
        End If

but, I cannot set iFrame visible to false.
I use this code :

StrJScript = "<SCRIPT>parent.document.form1.iFrmCustomer.visible = False;</SCRIPT>"
        If Not ClientScript.IsClientScriptBlockRegistered("S4") Then
            ClientScript.RegisterClientScriptBlock(Me.GetType(), "S4", StrJScript)
        End If

Raised error like this parent.document.form1.iFrmCustomer is null or not an object

Thanks

Done, I have solved that problem
I use this code :

StrJScript = "<SCRIPT>parent.document.getElementById('iFrmCustomer').style.display = 'none';</SCRIPT>"
  If Not ClientScript.IsClientScriptBlockRegistered("S4") Then
        ClientScript.RegisterClientScriptBlock(Me.GetType(), "S4", StrJScript)
  End If

Thanks Anyway...

The question is not solved yet. Actually "parent.document.getElementById('iFrmCustomer').style.display = 'none'" - this code will only clear the content of the iframe but the iframe window itself is not closing. Still the iframe is visible...

This question has already been answered. Start a new discussion instead.