title: File Upload is not working
body: <p>I'm using file upload in my site. I'm uploading word Document(Doc,Docx). Suddenly, it's not working. It is not getting the filename. It is showing empty!!! My Code is as follows:</p>
  
  <pre><code>&lt;asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1"&gt;
  
  &lt;table width="100%" align="center"&gt;
      &lt;tr&gt;
          &lt;td style="height: 21px" align="center"&gt;
              &lt;span class="lbl"&gt;&lt;/span&gt;
              &lt;asp:UpdatePanel ID="UpdatePanel2" runat="server"&gt;
                  &lt;ContentTemplate&gt;
                      &lt;asp:Button ID="btnResumedload" Text="Download Resume" runat="server" BackColor="Maroon"
                          ForeColor="White" Font-Bold="true" OnClick="btnResumedload_Click" Height="27px"
                          Width="195px" /&gt;
                  &lt;/ContentTemplate&gt;
              &lt;/asp:UpdatePanel&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="center"&gt;
              &lt;asp:UpdatePanel ID="UpdatePanel4" runat="server"&gt;
                  &lt;ContentTemplate&gt;
                      &lt;asp:Button ID="btnUploadnew" Text="Upload New" runat="server" BackColor="Maroon"
                          ForeColor="White" Font-Bold="true" OnClick="btnUploadnew_Click" Height="30px"
                          Width="198px" /&gt;
                  &lt;/ContentTemplate&gt;
              &lt;/asp:UpdatePanel&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="center"&gt;
              &lt;asp:UpdatePanel ID="UpdatePanel3" runat="server"&gt;
                  &lt;ContentTemplate&gt;
                      &lt;asp:Button ID="btnDel" Height="30px" Width="198px" OnClientClick="return confirm('Are you sure?');"
                          BackColor="Maroon" ForeColor="White" Font-Bold="true" Text="Delete Resume" runat="server"
                          OnClick="btnDel_Click"&gt;&lt;/asp:Button&gt;
                  &lt;/ContentTemplate&gt;
              &lt;/asp:UpdatePanel&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="center"&gt;
              &lt;asp:Label ID="lblmsg" runat="server" Font-Bold="True" ForeColor="Red" Visible="False"
                  Height="17px" Width="855px"&gt;&lt;/asp:Label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="center"&gt;
              &lt;span class="txt"&gt;
                  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
                      &lt;ContentTemplate&gt;
                          &lt;%--&lt;ajaxToolkit:AsyncFileUpload ID="fpResumenew" runat="server" Visible="false" /&gt;--%&gt;
                          &lt;asp:FileUpload ID="fpResumenew" runat="server" Visible="false" Width="226px" /&gt;
                      &lt;/ContentTemplate&gt;
                      &lt;Triggers&gt;
                          &lt;asp:PostBackTrigger ControlID="btnUpload" /&gt;
                      &lt;/Triggers&gt;
                  &lt;/asp:UpdatePanel&gt;
              &lt;/span&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td align="center"&gt;
              &amp;nbsp;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style="vertical-align: top" align="center"&gt;
              &lt;%--&lt;asp:Button ID="btnUpload" Font-Bold="true" DisabledText="Processing..." Visible="false"
                          Text="Upload" BackColor="Maroon" ForeColor="White" runat="server" OnClick="btnUpload_Click" /&gt;--%&gt;
              &lt;cc1:ClickOnceButton ID="btnUpload" Font-Bold="true" DisabledText="Processing..."
                  Visible="false" Text="Upload" BackColor="Maroon" ForeColor="White" runat="server"
                  OnClick="btnUpload_Click" DisableAfterClick="True" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p></p>
  
  <p>protected void btn_Click(object sender, EventArgs e)</p>
  
  <pre><code>{
  
      string strfilename = fp.FileName.ToString();
  
      if (fp.PostedFile.FileName.Trim().Length != 0)
  
      {
  
          binary = new byte[fp.PostedFile.ContentLength];
  
          binary = fp.FileBytes;
  
          doc = fp.FileName;
  
          contenttype = fp.PostedFile.ContentType;
  
  
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Just a sample!!!</p>
  
  <hr>
  
  <p>Nothing works for me.. Problem is that I'm using three more buttons in the same page. The other buttons initializing the file upload control. So, when clicking the upload button, the file name is empty. So, I used another page for uploading the word document. Now, it is working.. !! Anyhow, I need the solution for this!! Anyone give me idea!! </p>