Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
XML
Hi sir,
 I used fileupload control inside the ajax updatepanel, progress bar not displaying while uploading. In my project , i uploaded excel file, and read the contents and insert into database. My problem is, progress bar not displaying while upload operation, it takes 2 mins to complete the entire process of uploading work. I shared the code for your reference. Kindly give me the solution for this problem.

Code:

<div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel UpdateMode="Always" DisplayAfter="0" ID="UpdatePanel1" runat="server">
        <ContentTemplate>
          <table align="center">
            <tr>
                <td>
                    <asp:Label ID="Label1" runat="server" Text="Please select the file"></asp:Label>
                </td>
                <td>
                    <asp:FileUpload ID="FileUpload1" runat="server" />
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:Button ID="btn_upload" runat="server" onclick="btn_upload_Click"
                        Text="Upload" />
                </td>
                <td>
                    &nbsp;</td>
            </tr>

        </table>

        </ContentTemplate>

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


        </Triggers>

        </asp:UpdatePanel>
    <br />
        <asp:UpdateProgress AssociatedUpdatePanelID="UpdatePanel1" DynamicLayout="true"  DisplayAfter="0"  ID="UpdateProgress1" runat="server">
        <ProgressTemplate>



         <div id="overlay">

                <div id="progressone">

                    <div id="progresstwo">

                        <img src="images/loading.gif" alt="" />

                    </div>

                </div>

            </div>


        </ProgressTemplate>
        </asp:UpdateProgress>

    <br />
Posted

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