Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

Display loading progress bar (or wait progress) for MVC server-side calls in jQuery

With following JavaScript call back function sample, you can display progress for .net MVC non ajax server calls.

Note: Add default “DisplayProgressClass” to div

JavaScript code example,

initializeCallAndProgres (userHideProgress);
function initializeCallAndProgres(callback) {
            setTimeout(function () {
                //page js logic
                if (typeof callback == 'function')
                   //call back to stop progress
            }, 1500);


var userEndprogress = function () //here
to stop progress, remove progress class
    addOrRemoveClass(false, "#dvPageProgress", "DisplayPogressClass");