I have searched SO & google, but I can\'t seem to get this to work. The code is in the codebehind click event of a \"Cancel\" button in my asp.net application but does
You can use this instead
ScriptManager.RegisterStartupScript(this.Page, GetType(), "ClosePopup", "window.close();", true);
or you can also try this one
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "ClosePopup", "window.close();", true);
Have a Good day.