After successfully completing an ASP.NET operation, I want to automatically close the browser window. The following code is executed by a button within an Ajax UpdatePanel:
Page.ClientScript.RegisterClientScriptBlock(typeof(LeaveApproval), "ShowSuccess", "<script language=javascript>window.opener=self; self.close();</script>");
Unfortunately, this code does not achieve the desired result of closing the window. Despite working when entered directly into the URL bar, it seems there may be issues related to using ClientScriptManager in conjunction with Ajax.
Can anyone provide insight on what might be going wrong here?