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.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.