When trying to close an window from javascript in IE, which is opened manually,
a security warning “The web page you are viewing is trying to close the window. Do you want to close this window? Yes|No ” is popping up. Is there any possibility to close a window silently? Yes.

-----------------------------------------------------------

Solution:

1)

A simple hack i found on the web will help to get rid of this situation.


this.focus();
self.opener = this;
self.close();
2)

   
   
  1. Page.ClientScript.RegisterStartupScript(Me.GetType(), "close""window.open('','_parent','');window.close();", True)