Click here to Skip to main content
15,893,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
guys, i have an update progress that progress all update panels on the page.
what i am trying to do is to exclude an update panel from that progress.

what do you think?
Posted

You can have multiple UpdateProgress controls on the page, and by using the AssociatedUpdatePanelID property, you can make sure that the UpdateProgress is only shown when a certain UpdatePanel is updated.

Knowledgebase here:
Link 1[^]
Link 2[^]

UpdateProgress Class[^]
 
Share this answer
 
Comments
Ali Al Omairi(Abu AlHassan) 20-Mar-11 12:29pm    
thank you, sir. but i have to use one update progress as i am not the team leader.
Sandeep Mewara 20-Mar-11 12:34pm    
Then you can say to your team leader that it's not possible with one Update Panel.
Sandeep Mewara 20-Mar-11 12:38pm    
On second thought, actually it's possible.

Have a look at this article:
http://www.codeproject.com/KB/ajax/AfterAjaxUpdate.aspx

Track the update panel and if it's the one then on client side only, find the updateprogress (rendered as a div) and hide it. Don't show.

Possible.
Ali Al Omairi(Abu AlHassan) 20-Mar-11 17:20pm    
Basha, I saw your article and it was very helpfull. what i am thinking of is 'the opposite'. or in other works how to use Begin Request. Sir, I started with the code:
window.onload = function() {
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_beginRequest(function(sender, args) {
if ((args.get_postBackElement()).id == ‘<%= Button1.ClientID %>’)
document.getElementById('<%= UpdateProgress1.ClientID %>').style.display='none';
});
} but this didn't work yet. any suggestion;
}
Ali Al Omairi(Abu AlHassan) 20-Mar-11 19:31pm    
Sir, I have fixed my code to get something working. at the end i should thank you for making time thinking in my problim.

All my Respect, Sir;
if we use a div inside the updateprogress we can then hide and show it as necessary.
see the code:

JavaScript
function EndRequest(sender, args) {
    for (i = 0; i < sender._updatePanelIDs.length; i++) {
        if (sender._updatePanelIDs[i] == '<%= UpdatePanel1.UniqueID %>') {
            document.getElementById('<%= UpdateProgress1.ClientID %>').firstChild.style.display = 'block';
        }
    }
}
function BeginRequest(sender, args) {
    for (i = 0; i < sender._updatePanelIDs.length; i++) {
        if (sender._updatePanelIDs[i] == '<%= UpdatePanel1.UniqueID %>') {
            document.getElementById('<%= UpdateProgress1.ClientID %>').firstChild.style.display = 'none';
        }
    }
}




There is nothing like human will.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900