title: Update UI from code behind in real time
body: <p>I've created a socket listener, and I need to display a div (keep it hidden, then make it visible), when the server detects a certain socket data.<br></p>
  
  <p>I've tried to use a thread, but it doesn't update the UI in realtime, only if the page is reloaded or if you do a post back.<br><br>
  Here is an example of what I want to do, in this case I only want to update a textbox with codebehind data, I would like to do it without ajax, javascript or jQuery, if possible.<br><br>
  <strong>Code Behind:</strong></p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
          {
              Thread t = new Thread(TestThread);
              t.Start();
          }
  
          private void TestThread()
          {
              for (int i = 0; i &lt;= 1000000000; i++)
              {
                  myTextbox.Text += "1";
              }
          }
  </code></pre>
  
  <p><br>
  <strong>Webpage:</strong><br></p>
  
  <pre><code>&lt;asp:UpdatePanel runat="server" ID="myPanel" &gt;
      &lt;ContentTemplate&gt;
          &lt;asp:TextBox runat="server" ID="myTextbox" /&gt;
      &lt;/ContentTemplate&gt;
  &lt;/asp:UpdatePanel&gt;
  </code></pre>