Hi All,
I have a situation where I have a Asp.Net FileUpload control and a Button control on the page. There is also a UpdatePanel on the page which encloses some div tags. The problem is that whenever user clicks the button, the page posts back and the FileUpload control loses all the information. Below is the code for the same,
<div id="fileLoadProgress" class="slidingPanel" style="">
<asp:FileUpload ID="FileUploader" runat="server" />
<asp:Button ID="btnUpload" runat="server" Text="Upload" Height="20px" OnClick="btnUpload_Click" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div>
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left">
<div id="progressbar" style="width: 250px; height: 18px;">
</div>
</td>
<td>
<div id="dvProgressPrcent">
0%
</div>
</td>
<td>
<div id="infoBar">
</div>
</td>
</tr>
</table>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnUpload" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
I have gone through some articles on internet which stated that FileUpload control is not compatible with UpdatePanel and requires full postback. However my requirement doesn't permit me to do a full postback.
I came across one article which says that enclosing the FileUpload control and the Button in an iFrame can do the job.
However I have a doubt that how this can be done and if I implement it in that way, how can I then update the div tags which are present in the UpdatePanel. How will I be able to link the controls on main page to the controls on iFrame?
Thanks in advance.