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">
<table cellpadding="0" cellspacing="0" width="100%">
<div id="progressbar" style="width: 250px; height: 18px;">
<asp:AsyncPostBackTrigger ControlID="btnUpload" EventName="Click" />
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.