server control event in modal dialog
i have a pop up window that has a server button.
Now the server button has to insert certain values into database.
and display a msg saying that it inserted.
The problem that i am facing is that, onclick of the save button another window opens up
andd the message is popped on that window.
To close the window that is opened (onclick of the server button)
i have the window .close()
the child window of the popup window closes but the popup itself doesn't close.
can anyone help
this is the code used
Private Sub btnsave_ServerClick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.ServerClick
insert into database.
Response.Write("<script language=Javascript>")
'Response.Write("window.parent.returnValue='" & ptamt & "';")
Response.Write("window.parent.close();")
Response.Write("window.close();" & Chr(13))
Response.Write("</Script>")
End Sub
I can always have an option that all the child windows are closed after the code in the button click is executed.
But return one value to the parent window.
kindly help.
|