views:

49

answers:

1

I used the ASP.NET DetailsView across my application. I would like to know how I can detect that there are unsaved changes on the DetailsView and notify the user before navigating away from the page.

A: 

There is no "fullproof" way of detecting when a user is leaving the page. You would need some form of Ajax/Javascript solution to detect when the page is unloading, then you can just retrieve the details currently in the DetailsView, against the same record stored in the database.

James