Upload progress appears with any postback

Thread is closed for posting
9 posts, 0 answers
  1. Ibrahim Imam
    Ibrahim Imam avatar
    69 posts
    Member since:
    Jul 2007

    Posted 14 Mar 2010 Link to this post

    Hello,

    I have a problem with the progress area of upload control . when i select file and click on any control that causes postback the upload process starts and progress area appears, but actually no file is uploaded   which is not convenient. I need only to show the progress area and begin upload process when i need so. please help me.
    Thanks
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 16 Mar 2010 Link to this post

    Hello Ibrahim Imam,

    This is a known issue that we are about to fix. As a workaround please paste the following code right after your ScriptManager declaration:

    <asp:ScriptManager runat="server" ID="ScriptManager1">
    </asp:ScriptManager>
     
    <script type="text/javascript">
          var prm = Sys.WebForms.PageRequestManager.getInstance();
          var originalClientSubmit;
      
          if (!originalClientSubmit) {
              originalClientSubmit =
                  Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler;
          }
      
          Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler = function(e) {
              var isUploading = false;
      
              var inputs = $telerik.$("input[type='file']");
              $telerik.$.each(inputs, function() {
                  if (this.value != "") {
                      isUploading = true;
                      return;
                  }
              });
      
              if (isUploading)
                  originalClientSubmit.apply(this, [e]);
          }
      </script>

    Official fix will come with the next week's internal build. You can find more information on how to obtain the latest internal build here.

    Sincerely yours,
    Genady Sergeev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 18 Mar 2010 Link to this post

    Hi, I have the same problem and I tried your solution, but my problem is that the Radupload is in a RadTabStrip and with your solution the RadTab doesn't work. I use RadControl 2008 Q3 and I can't upgrade because there would be too much work.
  5. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 22 Mar 2010 Link to this post

    No solution ????
  6. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1596 posts

    Posted 22 Mar 2010 Link to this post

    Hello Pierre MAUREL,

    You can find a solution that works with Q3 2008 as an attachment.

    Best wishes,
    Genady Sergeev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  7. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 23 Mar 2010 Link to this post

    Thank you.
  8. Pierre MAUREL
    Pierre MAUREL avatar
    12 posts
    Member since:
    Aug 2012

    Posted 24 Mar 2010 Link to this post

    Your solution doesn't work. The upload process still starts.
    Can you try your exemple with a big file (the first time I tried with a small file and I didn't see the progress bar).

    Edit : I solve my problem with this example : http://www.telerik.com/help/aspnet-ajax/upload_howtopreventupload.html

    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <title></title
    </head> 
    <body> 
        <form id="form1" runat="server"
        <asp:ScriptManager runat="server" ID="ScriptManager1"
        </asp:ScriptManager> 
     
    <script type="text/javascript"
    function onClientSubmitting(progressManager, args) 
        var eventTarget = document.getElementById('__EVENTTARGET'); 
        if (eventTarget.value == '<%= RadTabStrip1.UniqueID %>') 
        { 
            //Clear the file inputs 
            var upload = $find("<%= RadUpload1.ClientID %>"); 
            var fileInputs = upload.getFileInputs(); 
            for (var i=0; i<fileInputs.length; i++) 
            { 
                upload.clearFileInputAt(i); 
            } 
        } 
    </script> 
     
        <div> 
            <telerik:RadProgressManager runat="server" ID="RadProgressManager1" OnClientSubmitting="onClientSubmitting" /> 
            <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" EnableAJAX="false"
                <telerik:RadTabStrip runat="server" ID="RadTabStrip1" MultiPageID="MultiPage1" AutoPostBack="false"
                    <Tabs> 
                        <telerik:RadTab Text="Tab1"
                        </telerik:RadTab> 
                        <telerik:RadTab Text="Tab2"
                        </telerik:RadTab> 
                    </Tabs> 
                </telerik:RadTabStrip> 
                <telerik:RadMultiPage runat="server" ID="MultiPage1"
                    <telerik:RadPageView runat="server" ID="Page1"
                        <telerik:RadUpload runat="server" ID="RadUpload1"
                        </telerik:RadUpload> 
                        <telerik:RadProgressArea runat="server" ID="RadProgressArea1"
                        </telerik:RadProgressArea> 
                        <asp:Button runat="server" ID="Button1" Text="Postback" /> 
                    </telerik:RadPageView> 
                    <telerik:RadPageView runat="server" ID="Page2"
                        Second tab 
                    </telerik:RadPageView> 
                </telerik:RadMultiPage> 
            </telerik:RadAjaxPanel> 
        </div> 
        </form> 
    </body> 
    </html> 

  9. Amar
    Amar avatar
    1 posts
    Member since:
    Oct 2011

    Posted 07 Jan 2015 Link to this post

    I am using q3 2014 version of Telerik Asp.net UI and I have the same issue. I have 2 RadDropDownTree one of which does a postback and instead of using the Radupload i am using the asp.net File upload control. when the postback from the RadDropDownTree occurs and if there is a file selected in the fileupload control , the RadProgressbar appears which is not what i want. Since there is a submit button on the form, i want the progress bar to only appear on the submit button click. Please help
  10. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 12 Jan 2015 Link to this post

    Hello Amar,

    Assuming that you use the ProgressArea, I must inform you that this behavior is expected, since the asp:fileupload is waiting for a postback on the page to submit the selected file. This is why, when a postback from RadDropDownTree the file is submitted and the ProgressArea appears.

    I can suggest you two things for overcoming the experienced behavior
    1. Use the RadAsyncUpload instead of the asp:FIleUpload, because the Async has a PostbackTriggers property, which you can use to specify for which control's postback the AsyncUpload should listen to and submit the file.

    2. You can ajaxify the RadDropDownTree, by nesting it in an UpdatePanel. In this case, there is no full postback and the selected file will not get submitted.

    Regards,
    Nencho
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017