title: Make panel invisible during Task
body: <p>I try to make a panel invisble during an long running task. But it does not work. If I use the compiler than I can see the change of the visible status but not during on the webpage.</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="homepage.WoW._default" Async="true" %&gt;
  </code></pre>
  
  <p>Here is my updatepanel:</p>
  
  <pre><code>&lt;asp:UpdatePanel ID="up_mplus" runat="server" UpdateMode="Conditional"&gt;
   &lt;ContentTemplate&gt;
    &lt;asp:Panel ID="p_test" runat="server"&gt;
     &lt;span style="position:absolute; width:calc(100% - 40px); height:25px; text-align:center"&gt;Mythic plus Season:&amp;nbsp;&lt;asp:DropDownList ID="ddl_mplus_season" runat="server" BackColor="Transparent" style="color:gainsboro; width:150px; height:21px; top:5px;" OnSelectedIndexChanged ="ddl_mplus_season_SelectedIndexChanged"&gt;&lt;/asp:DropDownList&gt;&lt;/span&gt;
      &lt;div id="div_mplus" runat="server" style="width:100%; height:calc(100% - 30px); top:30px"&gt;&lt;/div&gt; 
   &lt;/asp:Panel&gt;
  &lt;/ContentTemplate&gt;
  </code></pre>
  
  <p>  </p>
  
  <p>And here is the c# Code behind:</p>
  
  <pre><code>protected void btn_reolad_bottom_left_Click(object sender, ImageClickEventArgs e)
      {
          testc();
      }
  
      protected async void testc()
      {
          this.p_test.Visible = false;
          this.up_mplus.Update();
          await Task.Run(() =&gt;
          {
  
              System.Threading.Thread.Sleep(5000);
          });
  
          this.p_test.Visible =  true;
          this.up_mplus.Update();
      }
  </code></pre>