AllowdFileExtensions ignore when RadAsyncUpload moved in DOM

3 posts, 1 answers
  1. Andrew Dixon
    Andrew Dixon avatar
    15 posts
    Member since:
    Apr 2010

    Posted 04 Apr 2011 Link to this post


    I have a situation where I need to move a RadAsyncUpload control in the DOM.  After I move it the AllowedFileExtensions seems to be reset to allow all extensions.  I have not been able to work out how to set the AllowedFileExtensions via javascript.

    Here is the problem isolated in a simple example.  Initially only jpg and wmv files can be selected.  But once I click the bt_MoveDiv button and move the control in the DOM, all file types can be selected.

        <form id="form1" runat="server">
        <script language="javascript" type="text/javascript">
            function buttonClick() {
                var container = document.getElementById('container');
                var ph = document.getElementById('holder');
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            <div id="container">
                <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" AllowedFileExtensions="jpg,wmv">
                <telerik:RadProgressArea ID="RadProgressArea1" runat="server">
                <asp:Button ID="bt_Submit" runat="server" Text="Submit" onclick="bt_Submit_Click" />
            <div id="holder">
            <asp:Button ID="bt_MoveDiv" runat="server" Text="Move div" OnClientClick="buttonClick();return false;" />

    I had similar problems some time ago with RadEditor being moved in the DOM.  This problem was fixed with the onParentNodeChanged() function.  Is there something similar I can do for RadAsyncUpload?

  2. Answer
    Peter Filipov
    Peter Filipov avatar
    1028 posts

    Posted 05 Apr 2011 Link to this post

    Hi Andrew Dixon,

    A possible solution is to use the Flash module to upload files. You need to disable your Silverlight module. Please add the following code to your page:
    <script language="javascript" type="text/javascript">
                 Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function () { return false; };

    Another solution is to check the allowed file extensions client-side with the method get_allowedFileExtensions(). For more details refer to the help article.

    Peter Filipov
    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. Andrew Dixon
    Andrew Dixon avatar
    15 posts
    Member since:
    Apr 2010

    Posted 06 Apr 2011 Link to this post

    Hi Peter,

    Adding that line to my javascript seems to have fixed the problem.

    Andrew Dixon
Back to Top