title: UpdateProgress not working second time after image uploads
body: <p>UpdateProgress appears when btnSubmit click but in second time after i upload an image the UpdateProgress not appears . if i didn't upload an image the Update Progress appears . And also i found second time after the image uploads the <strong>ContentPlaceHolder1_updProgress</strong> is disappeared from the console. Otherwise(no image uploads in <strong>second time</strong>) <strong>ContentPlaceHolder1_updProgress</strong> is in console. So i think issue is with the image upload in second time. At my first click every thing is ok.</p>
  
  <p>My Aspx</p>
  
  <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel2" runat="server"&gt;
      &lt;Triggers&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="btnSubmit" /&gt;
      &lt;/Triggers&gt;
      &lt;ContentTemplate&gt;
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-6"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Class&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:DropDownList ID="drpClass" CssClass="form-control" OnSelectedIndexChanged="drpClass_SelectedIndexChanged" AutoPostBack="true" runat="server"&gt;&lt;/asp:DropDownList&gt;
              &lt;/div&gt;
              &lt;div class="col-sm-6"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Division&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:DropDownList ID="drpDiv" CssClass="form-control"
                      runat="server"&gt;
                  &lt;/asp:DropDownList&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-6"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Date&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:TextBox runat="server" ID="txtDateGiven" CssClass="form-control"
                      placeholder="Select a Date"&gt;&lt;/asp:TextBox&gt;
                  &lt;asp:CalendarExtender ID="CalendarExtender2" runat="server" Format="dd/MMM/yyyy" PopupButtonID="txtDateGiven"
                      TargetControlID="txtDateGiven"&gt;
                  &lt;/asp:CalendarExtender&gt;
              &lt;/div&gt;
  
              &lt;div class="col-sm-6"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Date of Submission&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:TextBox runat="server" ID="txtDateSubmit" CssClass="form-control"
                      placeholder="Select a Date"&gt;&lt;/asp:TextBox&gt;
                  &lt;asp:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd/MMM/yyyy" PopupButtonID="txtDateSubmit"
                      TargetControlID="txtDateSubmit"&gt;
                  &lt;/asp:CalendarExtender&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-12"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Subject&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:DropDownList ID="drpSubject" CssClass="form-control" runat="server"&gt;&lt;/asp:DropDownList&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-12"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Type&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:DropDownList ID="drpAssignmentType" CssClass="form-control" runat="server"&gt;&lt;/asp:DropDownList&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-12"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Title&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:TextBox ID="txtAssignmentTitle" CssClass="form-control" placeholder="Enter Title"
                      runat="server"&gt;&lt;/asp:TextBox&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-12"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Description&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:TextBox ID="txtAssignmentDes" CssClass="form-control" TextMode="MultiLine" Height="250"
                      placeholder="Enter Description"
                      runat="server"&gt;&lt;/asp:TextBox&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;asp:UpdatePanel ID="UpdatePanel3" runat="server"&gt;
      &lt;Triggers&gt;
          &lt;asp:PostBackTrigger ControlID="btnUpload" /&gt;
      &lt;/Triggers&gt;
      &lt;ContentTemplate&gt;
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-6"&gt;
                  &lt;p style="margin: 0 0 5px 0;"&gt;&lt;b&gt;Upload File&lt;/b&gt;&lt;/p&gt;
                  &lt;asp:FileUpload ID="imgPhoto" runat="server" /&gt;
                  &lt;br /&gt;
                  &lt;asp:Button ID="btnUpload" Text="Upload" runat="server" OnClick="btnUpload_Click"  /&gt;
                  &lt;% if (ViewState["Image"] != null)
                      {%&gt;
                  &lt;a target="_blank" href="&lt;%=ViewState["ImageName"]%&gt;"&gt;View Attachment&lt;/a&gt;
                  &lt;%}
                      else
                      { %&gt;
                  &lt;asp:Label ID="Label1" runat="server" ForeColor="Red" Text="No File Uploaded"&gt;&lt;/asp:Label&gt;
                  &lt;%} %&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;asp:UpdateProgress ID="updProgress" AssociatedUpdatePanelID="UpdatePanel1"
      runat="server"&gt;
      &lt;ProgressTemplate&gt;
          &lt;div class="modal"&gt;
              &lt;div class="center"&gt;
                  &lt;span style="padding-left: 10px"&gt;&lt;b&gt;Please Wait..&lt;/b&gt;&lt;/span&gt;
                  &lt;img alt="" src="../images/Preloader_3.gif" width="50" height="50" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/ProgressTemplate&gt;
  &lt;/asp:UpdateProgress&gt;
  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
      &lt;Triggers&gt;
          &lt;asp:AsyncPostBackTrigger ControlID="btnSubmit" EventName="Click" /&gt;
      &lt;/Triggers&gt;
      &lt;ContentTemplate&gt;
          &lt;div class="form-group row"&gt;
              &lt;div class="col-sm-6"&gt;
                  &lt;div class="col-sm-6"&gt;
                      &lt;asp:Button ID="btnSubmit" OnClick="btnSubmit_Click"
                          CssClass="btn btn-primary" OnClientClick="javascript:return btnSubmit();"
                          runat="server" Text="Submit" AutoPostBack="true" /&gt;
                      &lt;a href="assignment.aspx?sid=&lt;%=Request.QueryString["sid"] %&gt;" class="btn btn-default"&gt;Cancel&lt;/a&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Code Behind</p>
  
  <pre><code>   protected void btnSubmit_Click(object sender, EventArgs e)
      { 
         updProgress.Visible = true;
         SendEmail(Convert.ToInt32(drpDiv.Text));
         updProgress.Visible = false;
      }
  </code></pre>
  
  <p>May be this is a repeated question but i need to solve my issue </p>