You can save instance of window.open
and use that instance to close. Like declare global variable in aspx , say var win;
in script
tag, modify ScriptManager
to use following.
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup", String.Format("win = window.open('{0}','_tab ')", ResolveUrl("dummy.aspx")), true);
And if you want to close the pop up , from the page who opened popup, then use following
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup","win.close();", true);
And if you want to close with in popup page, then use following.
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "popup","window.close();", true);
Having said all of these, there is BIG disclaimer. In short, close does not work most of times, because of browser security. Following are the details.
Actually due to security reason and user experience aspects you can now can't cause the browser to be closed[Completely], only popup windows can be closed or the one parent to a script.
Just go through this - window.close and self.close do not close the window in Chrome
More link - http://www.w3.org/TR/html51/browsers.html#dom-window-close