I have several pages in my ASP.Net application and several Hyperlinks in pages.
Is there anyway I can alert users if he/she tries to navigate without saving data?
Please help
I have several pages in my ASP.Net application and several Hyperlinks in pages.
Is there anyway I can alert users if he/she tries to navigate without saving data?
Please help
Take a look at the JavaScript onbeforeunload event.
As a user fills in form fields, upon blur from any of the fields, set a HasData variable to true. Using the Onbeforeuload event, you can check to see if HasData is true. If so, you can prompt the user to confirm that they want to leave without saving.