client side detect upload coount?

2 posts, 0 answers
  1. randall
    randall avatar
    40 posts
    Member since:
    Apr 2009

    Posted 15 Apr 2014 Link to this post

    i'm trying to detect the upload count on client side and determine if its 0.
    If so i want to enable a panel. I've searched on the forum but cannot find a good example of how to detect upload count.

    anyone have an example how to do this?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Apr 2014 in reply to randall Link to this post

    Hi randall,

    You can't get the count of the uploaded file from client side. One suggestion is that you can use a global variable and increment it by one in the OnClientFileUploaded event and decrement by one in the OnClientFileUploadRemoved event. Please have a look into the sample code snippet which works fine at my end.

    <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" OnClientFileUploaded="OnClientFileUploaded" OnClientFileUploadRemoved="OnClientFileUploadRemoved" MultipleFileSelection="Automatic">
    <telerik:RadButton ID="RadButton1" runat="server" Text="Count" AutoPostBack="false"

    <script type="text/javascript">
        var uploadedFile = 0;
        function OnClientFileUploaded(sender, args) {
        function OnClientFileUploadRemoved(sender, args) {
        function UploadedFileCount(sender, args) {
            alert("Uploaded File " + uploadedFile);

    Let me know if you have any concern.
Back to Top