title: File Upload does not work inside a Grid View and Ajax Update Panel
body: <p>I want to upload a file inside a grid view and Ajax update panel. However, I think the file Upload tool can not post back inside an Ajax update panel. </p>
  
  <p>I have used the trigger method, but it did not work! Can any body help me?</p>
  
  <p><strong>Code Behind:</strong></p>
  
  <pre><code>if (((FileUpload)GridView1.Rows[0].Cells[0].FindControl("FileUpload1") as FileUpload).HasFile)
  {
      /////My stuffs
  }
  </code></pre>
  
  <p><strong>HTML code:</strong></p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" onrowdatabound="GridView1_RowDataBound"
     DataKeyNames="ID,ArticleID,UserName" DataSourceID="SqlDataSource1" 
     GridLines="Vertical" AllowPaging="True" PageSize="5"&gt;
     &lt;Columns&gt;
        &lt;asp:TemplateField&gt;
           &lt;ItemTemplate&gt;
              &lt;table style="width: 100%;"&gt;
                 ....//Other Stuffs
              &lt;/table&gt;
              &lt;%-- &lt;/asp:UpdatePanel&gt;--%&gt;
              &lt;/div&gt;
              &lt;/article&gt;
              &lt;/div&gt;
              &lt;/section&gt;
              &lt;/td&gt;
              &lt;/tr&gt;
              &lt;/table&gt;
              &lt;/div&gt;
              &lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                 &lt;td class="auto-style1"&gt;&amp;nbsp;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;/table&gt;
           &lt;/ItemTemplate&gt;
        &lt;/asp:TemplateField&gt;
     &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  &lt;Triggers&gt;
     &lt;asp:PostBackTrigger ControlID="FileUpload1" /&gt;
  &lt;/Triggers&gt;
  &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;/ContentTemplate&gt;
  </code></pre>