title: asp.net FileUpload doesn't work properly
body: <p>I have <code>asp:FileUpload</code> ,  two <code>asp:Button</code> ,  and <code>GridView</code> in <code>UpldatePanel</code>.</p>
  
  <pre><code>&lt;asp:FileUpload runat="server" ID="fileExcelUpload" /&gt;
  
  &lt;asp:Button  ID="btnShow" runat="server" Width="80px" OnClick="btnShow_Clicked"
                          AutoPostBack="true" Text="Save"/&gt;
  &lt;asp:Button  ID="btnImport" runat="server" Width="80px" OnClick="btnImport_Clicked"
                          AutoPostBack="true" Text="Save"/&gt;
  
  
  &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"&gt;
      &lt;ContentTemplate&gt;
  .........GridView...........
  &lt;/ContentTemplate&gt;
      &lt;Triggers&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="btnShow" EventName="Click" /&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="btnImport" EventName="Click" /&gt;
      &lt;/Triggers&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>Firstly , I retrieve some data from database and bind to <code>gridView</code> using <code>btnShow</code>.It works perfectly.<br>
  But when I upload Excel file with <code>asp:FileUpload</code> and click <code>btnImport</code> , </p>
  
  <pre><code>   protected void btnImport_Clicked(object sender, EventArgs e)
      {
          if (fileUExcelUpload.HasFile)
              { 
              .....
              }
      }
  </code></pre>
  
  <p>the boolean value <code>fileUExcelUpload.HasFile</code> return <code>False</code> .<br>
  But when I remove <code>&lt;asp:AsyncPostBackTrigger ControlID="btnImport" EventName="Click" /&gt;</code> from UpldatePanel's triggers , it return <code>True</code> .  </p>
  
  <p>(The reason why I add <code>btnImport</code>'s Click event to UpdatePanel's Triggers is , I want to persist Uploaded File of <code>asp:FileUpload</code> after postback . )<br>
  Is there any right way to do it ? Kindly help me Please :) Thanks !</p>