I would like to close the browser window when the ASP.NET operation was successful. The code below is triggered by a button located in the Ajax UpdatePanel.
Page.ClientScript.RegisterClientScriptBlock(typeof(LeaveApproval), "ShowSuccess", "<script language=javascript>window.opener=self; self.close();</script>");
However, this code has no effect. The window is not closed. When I enter javascript in the URL bar of my browser, it works fine, so I assume this is due to using ClientScriptManager along with Ajax.
Any idea what I'm doing wrong?
willem
source share