Answered by:
Problem with UpdateProgress and PostBackTrigger

Question
-
User2001833234 posted
Could someone help: I have a project where I'm using the 'FileUpload' Control in an update panel. In order to make the control work correctly I needed to add a 'PostBackTrigger' for the button that is used to process the file from the FileUpload control. That all works fine other than the program processes a lot of data and needs a progress bar to show the user that its still working. I have tried using the Ajax 'UpdateProgress' control but it will not work when the button (causing the Async post) has a PostBackTrigger associated with it.
Note: if you take off the Trigger, the UpdateProgress works just fine but the FileUpload fails.
I have run into this issue before with the FileUpload control. Any suggestions would really be appreaciated.
Here is a simple example
<form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:FileUpload ID="FileUpload" runat="server" /> <asp:Button ID="Button1" runat="server" Text="Button"/> </ContentTemplate> <Triggers> <asp:PostBackTrigger ControlID="Button1" /> </Triggers> </asp:UpdatePanel> <asp:UpdateProgress ID="updProgress" runat="server"> <ProgressTemplate> <div id="load" class="asyncPostBackPanel"> <img src="Images/indicator.gif" alt="Loading..." /> Loading... </div> </ProgressTemplate> </asp:UpdateProgress> </div> </form>
Friday, April 20, 2012 3:28 PM
Answers
-
User-68639941 posted
hi, Updateprogress will be display automatically only on AysncTrigger not on PostbackTriggers. anyhow you can manually show that
Refer : http://forums.asp.net/t/1101546.aspx/1?Update+Progress+show+on+Ajax+Full+Postback+Trigger
http://www.dotnetspider.com/forum/304184-Update-Progress-show-Ajax-Full-Postback-Trigger.aspx
http://www.vbforums.com/archive/index.php/t-611739.html
or you can also use some div with progress image
Edit: 1 fileupload control will work only on PostbackTrigger. so dont use AysncTrigger to show updateprogress refer below link
http://forums.asp.net/t/1101546.aspx/1?Update+Progress+show+on+Ajax+Full+Postback+Trigger
http://forums.asp.net/t/1101546.aspx/1?Update+Progress+show+on+Ajax+Full+Postback+Trigger
also you can try AsyncFileUpload Control
Refer : http://www.codeproject.com/Articles/42865/AsyncFileUpload-Control-New-Control-in-Ajax-Contro
http://asp-net-example.blogspot.in/2009/12/ajax-asyncfileupload-how-to-use.html
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 21, 2012 1:25 AM
All replies
-
User-68639941 posted
hi, Updateprogress will be display automatically only on AysncTrigger not on PostbackTriggers. anyhow you can manually show that
Refer : http://forums.asp.net/t/1101546.aspx/1?Update+Progress+show+on+Ajax+Full+Postback+Trigger
http://www.dotnetspider.com/forum/304184-Update-Progress-show-Ajax-Full-Postback-Trigger.aspx
http://www.vbforums.com/archive/index.php/t-611739.html
or you can also use some div with progress image
Edit: 1 fileupload control will work only on PostbackTrigger. so dont use AysncTrigger to show updateprogress refer below link
http://forums.asp.net/t/1101546.aspx/1?Update+Progress+show+on+Ajax+Full+Postback+Trigger
http://forums.asp.net/t/1101546.aspx/1?Update+Progress+show+on+Ajax+Full+Postback+Trigger
also you can try AsyncFileUpload Control
Refer : http://www.codeproject.com/Articles/42865/AsyncFileUpload-Control-New-Control-in-Ajax-Contro
http://asp-net-example.blogspot.in/2009/12/ajax-asyncfileupload-how-to-use.html
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, April 21, 2012 1:25 AM -
User1839833660 posted
you can use asyncfileupload control
http://www.csharpaspnetarticles.com/2012/04/asyncfileupload-example-asynchronous.html
or you can use jquery
http://www.csharpaspnetarticles.com/2012/04/fileupload-multiple-files-jquery.html
Saturday, April 21, 2012 1:43 AM