[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Why the UpdateProgress does not display!

Posted on 2009-02-20
15
Medium Priority
?
1,515 Views
Last Modified: 2012-05-06
Hi,  If I set the UpdateProgress Control to the UpdatePanels, nothing displays on
postback when I click on btnFlt button. If I don't set the associated control for the UpdateProgress controls, still nothing displays. Does anyone have any idea what I'm missing?
The following is my code:

<script>
    function CallServerFunction(command,arg) 
    { 
        //if (Page_ClientValidate(validation)) {
         var hiddenID = 'HiddenField1';//'<%#HiddenField1.ClientID%>'; 
        var hiddenField = document.getElementById(hiddenID); 
        hiddenField.value = command + "," + arg;
        __doPostBack(hiddenID,arg) 
        //}    
    } 
</script>      
...
...
<div id="divEditPath" runat="server" style="visibility:hidden;">
         <asp:UpdatePanel ID="updpnlEditPath" runat="server" UpdateMode="Conditional">
            <Triggers>
            </Triggers>
            <ContentTemplate>
          
               <table bgcolor="#fcfcfc" style="border-right: #fff 2px solid; border-top: #fff 2px solid;
               border-left: #fff 2px solid; width: 100%; border-bottom: #fff 2px solid" border="0">
                              <tr>
                               <td style="width: 100px">
                                   Filter Users:
                                   <asp:TextBox ID="txtFilterUsersGroups" runat="server"></asp:TextBox>&nbsp;
                                    <input type="button" runat="server" id="btnFilt" value="Filter" onclick="javascript:CallServerFunction('FilterUsersGroups','');"/>                                     
                               </td>
                               <td style="width: 100px">
                               </td>
                               <td style="width: 100px">
                               </td>
                           </tr>
                   </table>
                   </td>
               </tr>
           </table>
 
            </ContentTemplate>
       </asp:UpdatePanel>     
       <asp:UpdateProgress ID="UpdateProgress2" DynamicLayout="false" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="updpnlEditPath"  >
            <ProgressTemplate>
                <div style="width:680px;font-size:9pt;font-weight:bold; position:absolute; z-index:10000000" >
                    <img src="../images/ajax-loader.gif" />&nbsp;&nbsp;Loading...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        
        </div>

Open in new window

0
Comment
Question by:Abdu_Allah
  • 6
  • 5
  • 2
  • +1
15 Comments
 
LVL 1

Expert Comment

by:Wizardskills
ID: 23691255
You have the update mode set to conditional and yet you have no conditions in the update panels triggers. I think that may be why.
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 23691313
I removed them but still not working.
0
 
LVL 1

Expert Comment

by:Wizardskills
ID: 23691353
Have you set the update mode to "always"? Also, try just putting the image in the update progress in something like this as the div may be interfering with the position:
<asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="updpnlEditPath" DisplayAfter="0" >
            <ProgressTemplate>
                <asp:Panel ID="panUpdating" runat="server" BackColor="#BDDEFF" BorderColor="#6394CE" BorderStyle="solid" BorderWidth="1px">                   
                    <table>
                        <tr>
                            <td align="center">
                                <asp:Label ID="Label1" runat="server" Text="Updating..."></asp:Label>
                            </td>
                        </tr>                        
 
                        <tr>
                            <td align="center">
                                <asp:Image ID="Image1" runat="server" ImageUrl="~/images/ajax-loader.gif" />
                            </td>
                        </tr>
                    </table>                  
                </asp:Panel>                
 
                <cc1:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender1" runat="server" TargetControlID="panUpdating" HorizontalSide="Center" VerticalSide="Middle">
                </cc1:AlwaysVisibleControlExtender>
            </ProgressTemplate>
        </asp:UpdateProgress>

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Accepted Solution

by:
tiagosalgado earned 1800 total points
ID: 23691958
Try to put the updateprogress control inside of <ContentTemplate> tags.
<asp:UpdatePanel ID="updpnlEditPath" runat="server" UpdateMode="Conditional">
            <Triggers>
            </Triggers>
            <ContentTemplate>
          
               <table bgcolor="#fcfcfc" style="border-right: #fff 2px solid; border-top: #fff 2px solid;
               border-left: #fff 2px solid; width: 100%; border-bottom: #fff 2px solid" border="0">
                              <tr>
                               <td style="width: 100px">
                                   Filter Users:
                                   <asp:TextBox ID="txtFilterUsersGroups" runat="server"></asp:TextBox>&nbsp;
                                    <input type="button" runat="server" id="btnFilt" value="Filter" onclick="javascript:CallServerFunction('FilterUsersGroups','');"/>                                     
                               </td>
                               <td style="width: 100px">
                               </td>
                               <td style="width: 100px">
                               </td>
                           </tr>
                   </table>
                   </td>
               </tr>
           </table>
 <asp:UpdateProgress ID="UpdateProgress2" DynamicLayout="false" runat="server" DisplayAfter="0" AssociatedUpdatePanelID="updpnlEditPath"  >
            <ProgressTemplate>
                <div style="width:680px;font-size:9pt;font-weight:bold; position:absolute; z-index:10000000" >
                    <img src="../images/ajax-loader.gif" />&nbsp;&nbsp;Loading...
                </div>
            </ProgressTemplate>
        </asp:UpdateProgress>
            </ContentTemplate>
       </asp:UpdatePanel>     
       

Open in new window

0
 
LVL 21

Expert Comment

by:66866
ID: 23692172
If this is a test machine, try increasing the system.thread.sleep time and see if you are able to observe the updateprogress. Sometimes the panel gets updated very quickly to observe the progress
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 23692595
tiagosalgado suggestion works, but there is a weired issue, for the first request the updateProgress does not display after that it works. When I do refresh to the page and do request for the first time updateProgress does not display in the seond request it appears...only ont the first request updateProgress does not display!
0
 
LVL 21

Expert Comment

by:66866
ID: 23692799
Try making the updatemode "conditional" with the button as the trigger
0
 
LVL 8

Expert Comment

by:tiagosalgado
ID: 23693067
As 66866 said, you can attach your button to a PostBackTrigger.

<Triggers>
            <asp:PostBackTrigger ControlID="btnImportar" />
        </Triggers>

Open in new window

0
 
LVL 21

Expert Comment

by:66866
ID: 23693083
Shouldn't it be a AsynPostbacktrigger?
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 23694016
Attaching the button to a PostBackTrigger does not help.
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 23694023
there is no such AsynPostbacktrigger!
0
 
LVL 21

Expert Comment

by:66866
ID: 23694258
Use the following code in your Trigger section
<asp:AsyncPostBackTrigger ControlID="btnFilt" EventName="ServerClick" />

Open in new window

0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 23694578
Same thing!
0
 
LVL 21

Assisted Solution

by:66866
66866 earned 200 total points
ID: 23694629
Can you post your updated code?
0
 
LVL 3

Author Comment

by:Abdu_Allah
ID: 23695584
Nothing changed only the code that you and tiagosalgado have suggested.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Loops Section Overview
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question