> Here's the actual site I got the idea from, with source > code.http://www.ambujon.net/post/2008/11/01/ASPNET-File-Upload-in-an-Updat...
That solution doesn't make any sense to me at all. The onbeforeunload event is called when the page unloads, regardless of *how* it is triggered - via refresh (F5), clicking a bookmark, closing the browser, etc.