How to close a browser window in a page written in ASP.NET?
I tried to close the browser window using the javascript code page windows.close()
. But this command does not work. How can I close the browser window?
0
Author: Nicolas Chabanovsky, 2012-08-08
1 answers
Is this option suitable?
Dim strScript As String = " " & _
"var parentwin = window.self; " & _
"parentwin.opener = window.self; " & _
"parentwin.close(); "
' Закрываем окно
ClientScript.RegisterStartupScript(Me.GetType, "_CLOSE_", "<script language='javascript'>" + strScript + "</script>", False)
1
Author: casper, 2012-08-09 06:32:19