title: Is it possible to update text of a label object while ajax is still loading in vb.net?
body: <p>Basically I what to track the progress of a function that is being looped. The function is called by Ajax.</p>
  
  <p>For example, I have a update panel:</p>
  
  <pre><code>&lt;form runat="server"&gt;
  &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
  &lt;/asp:ScriptManager&gt; 
  
  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="True" UpdateMode="Always"&gt;
  
  &lt;ContentTemplate&gt; 
  
  &lt;div&gt;
  &lt;asp:Label ID="testing" runat="server"&gt;&lt;/asp:Label&gt;
  &lt;/div&gt;          
  
  &lt;/ContentTemplate&gt; 
  &lt;Triggers&gt;
  
  &lt;asp:AsyncPostBackTrigger ControlID="myButton" EventName="Click"/&gt;
  &lt;/Triggers&gt;
  &lt;/asp:UpdatePanel&gt;
  
  &lt;div style="display:none;"&gt;
  &lt;asp:Button ID="myButton" Text="SomeFunction" OnClick="myFunc" runat="server"&gt;
  /asp:Button&gt;
  &lt;/div&gt;
  
  ...
  &lt;/form&gt;
  </code></pre>
  
  <p>Let's say my function in code behind is:</p>
  
  <pre><code>Protected Sub myFunc
  
    Dim i As Integer
  
      For = 0 to 1000
  
        'Some other function here consumes time
  
        testing.text = i.ToString
  
      Next
  
  End Sub
  </code></pre>
  
  <p>Understanding that Response.write does not mix with ajax, so I want to update the text using a label object and track the progress of the loop of the function.</p>
  
  <p>However, seems that the text won't be updated until the ajax call finishes completely, it will only change to the very last number of the loop.</p>
  
  <p>My question is, is there any way that I could let the text object keep changing at real time while the loop function is still running on the server side?</p>
  
  <p>Thanks!</p>