How do I update textbox while executing server side loop in aspx/c#

How do I update textbox while executing server side loop in aspx. It currently only updates after the loop is complete. I have tried repeatedly to use updatepanel with no success. I have been asking and looking on many other sites.

function updateStatus(msg){  
document.getElementById('txtStatus').value = 'new value here'
document.getElementById('txtStatus').onchange();
return false;}

<asp:TreeView Name="tvAppTree" ID="tvAppTree" runat="server" style="margin-left:5px" NodeIndent="1" ShowLines="True" Font-Bold="False" CssClass="TreeItem" OnSelectedNodeChanged="tvAppTree_SelectedNodeChanged" OnLoad="tvAppTree_Load" Width="150px" height="700px"> <%--"#6666AA" --%> </asp:TreeView>

<asp:ScriptManager ID="ScriptManager2" runat="server"></asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <asp:Textbox ID="txtStatus" runat="server" AutoPostBack="False" Width="1233px" BorderStyle="None">...</asp:Textbox> </asp:UpdatePanel>

 private void UpdateStatus(string msg)
 {

 
    System.Text.StringBuilder sb = new System.Text.StringBuilder();
    sb.Append(@"<script language='javascript'>");
    sb.Append(@"updateStatus('" + msg + "');");
    sb.Append(@"</script>");
    ScriptManager.RegisterStartupScript(this, this.GetType(), "JCall1", 
 sb.ToString(), false);
    UpdatePanel1.Update();
    //ClientScript.RegisterStartupScript(this.GetType(), "JCall1", 
 sb.ToString());
   
}