In my login page I need a function where user clicks on the "Login" button and a loader appears (GIF or any kind of message) before page fully loads.
I tried many ways to do that but I wasn't successful. The loader only shows up after page is fully loaded.
Is there any function that it can display the loader while page is loading or server is processing?
I appreciate your efforts in reaching a solution for my problem.

asp:UpdateProgressajaxas it is async.$.ajax({ url : 'your_url', type: 'POST', dataType: 'json', data: 'your_data', dataType: 'application/json; charset=utf-8' success: function() { } });Before calling ajax you can show the spinner and hide it in success function.