I\'d like to warn users when they try to close a browser window if they didn\'t save the changes they made in the web form.
I\'m us
You could create a control that extends IExtenderProvider and have that create the JavaScript to track the changes (or more likely register the controls with a change tracking mechanism).
You're still going to have to implement the change tracking in Javascript though, unless you want a lot of Postbacks.
I did this at a previous employer using Prototype.Js. I think the only difficult thing was the difference between the way that Internet Explorer and Firefox require the "cancel navigation" flag to be set.