This is a migrated thread and some comments may be shown as answers.

AsynchUpload in div with display none and AllowedFileExtensions

1 Answer 48 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
ithihas
Top achievements
Rank 1
ithihas asked on 12 Jul 2012, 07:32 AM

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.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Jul 2012, 09:01 AM
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.
Tags
AsyncUpload
Asked by
ithihas
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or