I am trying to do a very simple task, to show a pop-up in my application which says
"Please wait..We are Processing your Request..." or "Loading... ", whenever an user clicks on a button and after processing his request, the pop-up should disappear.
But the important thing is i don't want to use update panel to achieve this.
I have gone through many sites for solutions, and i got the below related solutions so far.
1. By using some ajax controls like update panel, update progress and modal pop extender and some javascript which gets the instances of when the request begun and when it ended, hence showing a pop-up between the range, which is what i was looking for. But the problem came when i got to know that it only handles the asynchronus requests, not the synchronus requests.
2. Some jquery functions(SetTimeOut), which will show a pop-up menu for a few seconds(even the time limit is defined while scripting), and disappears after the time limit. Again, this is far from what i have been looking for. This will have no clue, when exactly the processing of request has been completed!
So i wanted to have the same functionality of what the above FIRST method does, but for a normal synchronus postback, so that i can use it wherever i need, without touching update panel.
Below is the javascript code for FirstMethod.
(Just to provide more info about my first point)
var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_beginRequest(BeginRequestHandler);
prm.add_endRequest(EndRequestHandler);
function BeginRequestHandler(sender, args) {
var popup = $find('<%= modalPopup.ClientID %>');
if (popup != null) {
popup.show();
}
}
function EndRequestHandler(sender, args) {
var popup = $find('<%= modalPopup.ClientID %>');
if (popup != null) {
popup.hide();
}
}