Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I found that when we add any PostBackTrigger to the updatepanel the updateprogress won't display. we have to display it explicitly through javascript.
Please help me that how i can display the update progress through the javascript for the below mentioned code.
Thanks in advance.

    <asp:ScriptManager ID="ScriptManager1" runat="server" enablepagemethods="true" />
 <asp:UpdatePanel ID="UpdPanel" runat="server">
 <ContentTemplate> 
<div id="EQDUMPUpload"  runat="server" align="center" 
        style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table >
<tr>
<td>
    <asp:Label ID="Label1" runat="server" 
        Text="Step 1 : Upload the ReportEQ File" Font-Bold="True" ForeColor="Blue"></asp:Label>
    </td>
<td>
    <asp:FileUpload ID="EQDumpUploader" runat="server" />
</td>
</tr>
<tr>
<td></td>
<td>
</td>
<td></td>
</tr>
</table>
</div>
<div id="HRISUpload"  runat="server" align="center" 
        style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table >
<tr>
<td><asp:Label ID="Label2" runat="server" 
        Text="Step 2 : Upload the HRISInfo File" Font-Bold="True" ForeColor="Blue"></asp:Label></td>
<td>
   <asp:FileUpload ID="HrisUploader" runat="server" />
</td>
</tr>
<tr>
<td></td>
<td>
</td>
<td></td>

</tr>
</table>
</div>
<div id="GenerateReportDiv"  runat="server" align="center"    style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table>
<tr>
<td>    
    <asp:Button ID="btnGenerateReport" runat="server" Text="Generate Allocation Report" 
        onclick="btnGenerateReport_Click" Font-Names="Verdana" Font-Size="10pt" 
        UseSubmitBehavior="True"  />        
</td></tr></table>
</div>
<div id="divConfirmation"  runat="server"  align="center" style="position: relative; z-index: inherit; width: 930px; height: auto; top: 0px; right: 0px; bottom: 0px; left: 0px">
        <table>
        <tr>
        <td>
<asp:Label ID="lblCnfrm" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Font-Names="Verdana" Font-Size="Small" ></asp:Label>
        </td>
        </tr>
        <tr>
        <td>
<asp:Label ID="lblHRISCnfrm" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Font-Names="Verdana" Font-Size="Small" ></asp:Label>
        </td>
        </tr>
        <tr>
        <td>
<asp:Label ID="lblAllocationCnfrm" runat="server" Text="Label" Font-Bold="True" ForeColor="Red" Font-Names="Verdana" Font-Size="Small" ></asp:Label>
        </td>
        </tr>
        </table>
        </div>
        </ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnGenerateReport" />
</Triggers>
</asp:UpdatePanel>
        <asp:Updateprogress id="updProgress" runat="server" 
        associatedupdatepanelid="UpdPanel">
                    <Progresstemplate>
                    <div id="Layer1" style="removed:absolute; z-index:1; removed 50%;removed 50%;">
                        <img src="Images/waiting.gif" alt="" />
                        </div>                 
                    </Progresstemplate>
            </asp:Updateprogress> 
</asp:Content>
Posted
Updated 24-Feb-12 1:23am
v4
Comments
Dharmenrda Kumar Singh 24-Feb-12 7:44am    
After removing div tag from the Progress template also it is not working.The problem is due to <asp:PostBackTrigger ControlID="btnGenerateReport" /> .

XML
<asp:UpdateProgress ID="up1" runat="server" DynamicLayout="false" AssociatedUpdatePanelID="upCountry">
      <ProgressTemplate> 
        <img alt="Progress" src="Image/nycli1.gif" style="width: 14px; height: 13px" />
      </ProgressTemplate>
</asp:UpdateProgress>



I think because of div it's not working.. Just try removing that..
 
Share this answer
 
Comments
@rpit Trivedi 5-Feb-16 7:08am    
It remains same after removing "div"

Not Working... :(
<asp:content id="Content1" contentplaceholderid="MainContent" runat="Server" xmlns:asp="#unknown"> 
 <asp:scriptmanager id="ScriptManager1" runat="server" enablepagemethods="true" />    
 <script type="text/javascript">
        var updateProgress = null;

        function postbackButtonClick() {
            updateProgress = $find("<%= UpdateProgress.ClientID %>");
            window.setTimeout("updateProgress.set_visible(true)", updateProgress.get_displayAfter());
            return true;
        }
</script>
 <asp:updatepanel id="UpdPanel" runat="server" updatemode="Conditional">
 <contenttemplate> 
<div id="EQDUMPUpload"  runat="server" align="center">
        style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table>
<tr>
<td>
    <asp:label id="Label1" runat="server">
        Text="Step 1 : Upload the ReportEQ File" Font-Bold="True" ForeColor="Blue"></asp:label>
    </td>
<td>
    <asp:fileupload id="EQDumpUploader" runat="server" />
</td>
</tr>
<tr>
<td></td>
<td>
</td>
<td></td>
</tr>
</table>
</div>
<div id="HRISUpload"  runat="server" align="center">
        style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table>
<tr>
<td><asp:label id="Label2" runat="server">
        Text="Step 2 : Upload the HRISInfo File" Font-Bold="True" ForeColor="Blue"></asp:label></td>
<td>
   <asp:fileupload id="HrisUploader" runat="server" />
</td>
</tr>
<tr>
<td></td>
<td>
</td>
<td></td>

</tr>
</table>
</div>
<div id="GenerateReportDiv"  runat="server" align="center" style="position: relative; z-index: inherit; width: auto; height: auto; top: auto; right: auto; bottom: auto; left: auto">
<table>
<tr>
<td>    
    <asp:button id="btnGenerateReport" runat="server" text="Generate Allocation Report">
        onclick="btnGenerateReport_Click"  Font-Names="Verdana" Font-Size="10pt" 
        UseSubmitBehavior="True" OnClientClick="return postbackButtonClick();" ClientIDMode="Static"  />        
</asp:button></td></tr></table>
</div>
<div id="divConfirmation"  runat="server" align="center" style="position: relative; z-index: inherit; width: 930px; height: auto; top: 0px; right: 0px; bottom: 0px; left: 0px">
        <table>
        <tr>
        <td>
<asp:label id="lblCnfrm" runat="server" text="Label" font-bold="True" forecolor="Red" font-names="Verdana" font-size="Small"></asp:label>
        </td>
        </tr>
        <tr>
        <td>
<asp:label id="lblHRISCnfrm" runat="server" text="Label" font-bold="True" forecolor="Red" font-names="Verdana" font-size="Small"></asp:label>
        </td>
        </tr>
        <tr>
        <td>
<asp:label id="lblAllocationCnfrm" runat="server" text="Label" font-bold="True" forecolor="Red" font-names="Verdana" font-size="Small"></asp:label>
        </td>
        </tr>
        </table>
        </div>
 </contenttemplate>
 
<triggers>
<asp:postbacktrigger controlid="btnGenerateReport" />
</triggers>
</asp:updatepanel>
 <asp:updateprogress id="UpdateProgress" runat="server">
        associatedupdatepanelid="UpdPanel">
                    <progresstemplate>
                    <div id="Layer1" style="removed:absolute; z-index:1; removed 50%;removed 50%;">
                        <img src="Images/waiting.gif" alt="" />
                        </div>              
                    </progresstemplate>
            </asp:updateprogress>    
</asp:content>


Now the Update panel is working after writing the javascript and doing a few modification in the code.
 
Share this answer
 
v2
Comments
binodthapa 31-May-13 6:34am    
message of update progress not hide. Please help me. How to hide.
mac_sak 1-Mar-14 1:56am    
Me too have the same problem... like after postback the image not hide. how to solve this?
harRYPRASATH 14-Dec-14 0:04am    
What modification did you make on your code?
Member 11378689 18-Jan-15 23:34pm    
Hello, this code works for me, but when i want to download or export file (ex. export excel file), the update progress screen still display and won't close. Can you help me how to close or stop it? I'm using IE 11 browser.

Any help would be appreciate it. Thanks

nb: sorry for my english is not so well.
Try Replacing This
SQL
<asp:updateprogress id="UpdateProgress" runat="server">
        associatedupdatepanelid="UpdPanel">


with
SQL
<asp:updateprogress id="UpdateProgress" runat="server"
        associatedupdatepanelid="UpdPanel">
 
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