RadAsyncUpload1.UploadedFiles.Count always shows 0

2 posts, 0 answers
  1. Jagat
    Jagat avatar
    140 posts
    Member since:
    Jan 2011

    Posted 02 Dec 2016 Link to this post

    Hi,

    I uploaded 3 files using this control. Within  a button click, i want to see the number of files that i uploaded. It always shows 0.

    Why am i not getting proper count here?

     

      <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" AllowedFileExtensions =".pdf,.jpg,.jpeg,.txt" 
                  MultipleFileSelection="Automatic" BorderStyle="Groove"     >
                                     <Localization Select=" Select a file "    />
                                 </telerik:RadAsyncUpload>

     

    for (int fileNum = 0; fileNum <= RadAsyncUpload1.UploadedFiles.Count - 1; fileNum++)
    {

    }

     

     

    Thanks

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1132 posts

    Posted 05 Dec 2016 Link to this post

    Hello Jagat,

    If the files are uploaded without any exceptions you should be able to access the uploaded files' count on the server in the button's click handler. I attached a sample page that shows that by displaying the count in a TextBox.

    Regards,
    Ivan Danchev
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
Back to Top