I am creating an ASP.NET/C# application. I want a progress bar/loading appear when selecting a RadioButtonList & DropDownList. The RadioButtonList & DropDownList is AutoPostBack.
I need to display a progress bar/loading for RadioButtonList & DropDownList.
Thank You.
function ShowProgress() {
setTimeout(function () {
var modal = $('<div />');
modal.addClass("modal");
$('body').append(modal);
var loading = $(".loading");
loading.show();
var top = Math.max($(window).height() / 2 - loading[0].offsetHeight / 2, 0);
var left = Math.max($(window).width() / 2 - loading[0].offsetWidth / 2, 0);
loading.css({ top: top, left: left });
}, 200);
}
$('form').live("submit", function () {
ShowProgress();
});
You can add some JavaScript and Html to show loader on each postback. Please find out the helping urls below:
Display loading image while PostBack calls in ASP.Net
Locking the Screen During a Postback
How to show loading image on every post back ?
Show Loading Progress Indicator using GIF Image when UpdatePanel is updating in ASP.Net