AsynchUpload in div with display none and AllowedFileExtensions

2 posts, 0 answers
  1. ithihas
    ithihas avatar
    14 posts
    Member since:
    Jun 2012

    Posted 12 Jul 2012 Link to this post

    Hello,

    I have a RadAsynchUpload control inside a div with style display:none.

    When the user clicks a certain radio I switch the div to display:block. In this scenario the AllowedFileExtensions is ignored. If I put the upload control in a div with normal display it works.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 12 Jul 2012 Link to this post

    Hello,

    Unfortunately I cannot reproduce the issue at my end. Here I am pasting the full code that I tried which worked as expected.
    aspx:
    <div id="div2" runat="server" style="display: none">
    <telerik:RadAsyncUpload ID="as" runat="server" AllowedFileExtensions=".png"></telerik:RadAsyncUpload>
    </div>
    <asp:RadioButton ID="RadioButton1" AutoPostBack="true" runat="server" OnCheckedChanged="RadioButton1_CheckedChanged" />
    C#:
    protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
    {
     RadioButton btn = (RadioButton)sender;
     HtmlGenericControl container = (HtmlGenericControl)btn.FindControl("div2");
     container.Style.Add("display", "block");
    }

    Thanks,
    Princy.
Back to Top