1
Answer

Progress bar not displaying while using fileupload in ajax

Prabu Spark

Prabu Spark

10y
995
1
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 />

Answers (1)