Possible Duplicate:
Best way to detect when user leaves a web page
I'm attemping to give a user the option to stay on the current page when they attempt to navigate away from it (if they have not saved changes to their progress). I'm unsure how to approach this as I have tried and failed JavaScript.
I'm hoping there is a way inside the Page_Unload function in ASP.NET C# code.
any help would be much appreciated.