Hey Millerk,
First off, quick lesson about session_OnEnd:
The session_OnEnd does NOT fire when the browser is closed. On the webserver, there is a setting you can set for how long a session can live without any interaction (ie. requesting pages, etc.). So if you have that set to, lets say, an hour, then the session_onend won't fire until an hour from the moment your user stops doing anything on your site.
Its still a good idea to set the session_onend to do any final clean up, but it isn't something that you can access from a button click, etc.
So if you put the code in there, eventually the files will be deleted (it may just take a while). But what if you want the files to be deleted when the user closes the browser or goes to a different page? That takes a little bit of javascript, but its not that hard.
In either your page's body tag or frameset's main frameset tag, you can specify what to do "onunload". This event fires when the user closes the browser or browses to anotehr page. Here's how we used both the "onunload" and the code behind to handle logout of our portal:
If the user closes the browser, then the onunload opens a new window (a small new window). This is a logoff aspx page, that has code in its page_load function that clears out the login information from teh database. In your case, it would delte files. In that page's onload event (in the html), I have a window.close() so the window closes once its done.
In case that buggers up, or they are just inactive, the Session_OnEnd code does pretty much the same thing, just later.
Sorry about the length, and I hope I was clear. Let me know if you have any other questions.
jack