IFrame module is used

4 posts, 0 answers
  1. Shahi
    Shahi avatar
    17 posts
    Member since:
    Apr 2013

    Posted 29 Jul 2013 Link to this post

    Hi guys

    I was trying to manually upload files and thought that IE uses the SL module for uploading files. I have read the same thing and when I checked I found that the IFrame is being used and I didnt add any js code to disable the silverlight. I was trying the exact manual upload sample in the demo.

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

    Posted 29 Jul 2013 Link to this post

    Hi Shahi,

    This is an expected behavior of RadAsyncUpload in IE browsers. Please note that when manual upload is used under IE 9/8/7 the Upload Module is automatically set to IFrame.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shahi
    Shahi avatar
    17 posts
    Member since:
    Apr 2013

    Posted 29 Aug 2013 Link to this post

    Hi shinu. Once all the files are uploaded on the server how can I alert the total uploaded data in mb?

    Please help
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Aug 2013 Link to this post

    Hi Shahi,

    Please have a look at the full code I tried which works fine at my end.

    ASPX:
    <telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload1" PostbackTriggers="RadButton1"
        TargetFolder="~/Images/Img/" AllowedFileExtensions=".jpg,.zip" MaxFileSize="579371152"
        MultipleFileSelection="Automatic" UploadedFilesRendering="BelowFileInput" OnFileUploaded="RadAsyncUpload1_FileUploaded">
    </telerik:RadAsyncUpload>
    <br />
    <telerik:RadButton ID="RadButton1" runat="server" Text="Upload" OnClick="RadButton1_Click">
    </telerik:RadButton>

    C#:
    float TotalBytesUploaded;
     
    protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
    {
        TotalBytesUploaded += e.File.ContentLength;
        string targetfolder = RadAsyncUpload1.TargetFolder;
        e.File.SaveAs(Path.Combine(Server.MapPath(targetfolder), e.File.FileName));
    }
     
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        float megabytes = TotalBytesUploaded / 1048576;
        string totalsize = "Total Uploaded Size : " + megabytes.ToString("f2") + " MB";
        Response.Write("<script>alert('" + totalsize + "')</script>");
    }

    Thanks,
    Shinu.
Back to Top