This example give you basic ajax call in MVC deom.
Since all the Ajax interactions happen behind the scenes asynchronously, the user doesn’t understand what’s going on. That is time between ajax request and ajax response. Some tine it will take time to response, where you can show loading data image or please wait request is in progress or progress bar.
Using jquery you can do it very easily with the help of ajaxStart and ajax ajaxStop function
Whenever an Ajax request is about to be sent, jQuery checks whether there are any other outstanding Ajax requests. If none are in progress, jQuery triggers the
ajaxStart event. Any and all handlers that have been registered with the
.ajaxStart() method are executed at this time.
This function will execute whenever you give ajax request on this page.
Whenever an Ajax request completes, jQuery checks whether there are any other outstanding Ajax requests. If none remain, jQuery triggers the
ajaxStop event. . Any and all handlers that have been registered with the
() method are executed at this time.