posting back with a textbox vs label
<p>Here is my code - </p>

<pre><code>dtDetails = getDataSet();

foreach (DataRow dr in dtDetails.Rows) {

    int rowID = 1;
    HtmlTableRow row = new HtmlTableRow();
    {
        HtmlTableCell cell = new HtmlTableCell();
        TextBox tb = new TextBox();
        tb.ID = "tbJanuary" + rowID;

        tb.Text = dr["Jan"].ToString();

        cell.Controls.Add(tb);
        row.Cells.Add(cell);
    }

    rowID ++;
}
</code></pre>

<p>When this initially runs, I get correct values within my textboxes.</p>

<p>However, when I update a value in the database through a button click on the page, it causes the expected PostBack. When I come back into this loop, dr["Jan"].ToString() has the new correct value base don that change, but the textbox on the oage never gets updated.</p>

<p>If I change the code to this - </p>

<pre><code>dtDetails = getDataSet();

foreach (DataRow dr in dtDetails.Rows) {

    int rowID = 1;
    HtmlTableRow row = new HtmlTableRow();
    {
        HtmlTableCell cell = new HtmlTableCell();
        Label lbl = new Label();
        lbl.ID = "lblJanuary" + rowID;

        lbl.Text = dr["Jan"].ToString();

        cell.Controls.Add(lbl);
        row.Cells.Add(cell);
    }

    rowID ++;
}
</code></pre>

<p>the label contains the correct new value.</p>

<p>What is it about the text box that doesn't display the correct value?</p>
