Friday, November 06, 2009

A simple way to add OnUnload to the body of a page

Page.ClientScript.RegisterStartupScript(typeof(string),"AutoCloseWindow","window.onunload = function () { window.opener.location.href = window.opener.location.href; window.close(); };", true);

Post a Comment