Question:
I am using ASP.NET web forms, c#.
I need to execute a JS function just before the page closes - any which way it closes - being a redirect or any other method.
Extra Info:
As some extra info; the function will be an HTTP POST to a different page, I need some server side code to execute.
With this info in mind - a solution allowing me to execute server-side code when a page closes will work for me as well.