My objective is to save the data if the user did not click the save button and wants to exit or navigate to another page in MVC.
I didn't find any help on how to do this. So far I have come across the OnBeforeUnload
method in jquery but it only shows the message on exiting and it does not call the MVC controller method.
How can I accomplish this?