Retain uploaded files for display after postback

38 posts, 0 answers
  1. Andrew
    Andrew avatar
    2 posts
    Member since:
    Aug 2011

    Posted 07 Jul 2014 in reply to Hristo Valyavicharski Link to this post

    I wouldn't exactly say "working fine."  If the user pushes the back button or otherwise reloads the page, the submit action will be triggered possibly resulting in duplicate data records being created.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 08 Jul 2014 in reply to Andrew Link to this post

    Hi Andrew,

    Unfortunately I couldn't replicate the issue at my end. After setting PostbackTriggers for RadAsyncUpload, the uploaded file will save to the TargetFolder only through the postback happened by the PostbackTrigger control. This is the default behavior of the control. If the page reload is happening then the control will lose the selected file but it will not saved into the TargetFolder. Please have a look into the sample code snippet which works fine at my end.

    ASPX:
    <telerik:RadAsyncUpload ID="rasynuploadAllFiles" runat="server" TargetFolder="Uploads"
        PostbackTriggers="rbtnUpload">
    </telerik:RadAsyncUpload>
    <telerik:RadButton ID="rbtnUpload" runat="server" Text="Upload">
    </telerik:RadButton>

    Please elaborate your requirement if it doesn't help.
    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jay
    Jay avatar
    59 posts
    Member since:
    Apr 2009

    Posted 12 Jun 2015 Link to this post

    Is this still the work around for handling this situation? I'm having the same issue where if a user forgets to fill in a required field they lose all the files they had previously selected and I'm hoping that since this thread started in 2012 it's been addressed so I don't have to use a hidden button. (fingers crossed)
  5. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 15 Jun 2015 Link to this post

    Hi Jay,

    Try to use server validation: 
    http://demos.telerik.com/aspnet-ajax/asyncupload/examples/server-side-validation/defaultcs.aspx

    Regards,
    Hristo Valyavicharski
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  6. Jay
    Jay avatar
    59 posts
    Member since:
    Apr 2009

    Posted 16 Jun 2015 in reply to Hristo Valyavicharski Link to this post

    So am I reading this correctly that you are still using the hidden button "workaround"?
  7. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 17 Jun 2015 Link to this post

    Jay,

    There are no hidden buttons in the pointed demo. A new property was introduced:
    <telerik:RadAsyncUpload runat="server" EnableCustomValidation="true" ID="RadAsyncUpload1" MultipleFileSelection="Automatic"
               Skin="Silk" OnFileUploaded="RadAsyncUpload1_FileUploaded" >
           </telerik:RadAsyncUpload>

    Regards,
    Hristo Valyavicharski
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  8. nitin
    nitin avatar
    1 posts
    Member since:
    Sep 2015

    Posted 28 Sep 2015 Link to this post

    hi,

    Can anyone help me..urgently..

    i have used RAD upload control for file uploading(.csv) and after uploaded file i push that file into another button and at that time telerik control get hide so please help

  9. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 29 Sep 2015 Link to this post

    Hi Nitin,

    Can you elaborate a little bit more? What exactly is the issue? Paste your code here or attach sample.

    Thanks.

    Regards,
    Hristo Valyavicharski
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017