How to retrieve TextBox value in ViewState from its ID
<p>I am building many textboxes programmatically in my ASP.NET page, after I've clicked a button, I would like to process those values, is there any possibility to retrieve them from their ID in ViewState ?</p>

<p>Here is my code :</p>

<p>Reference of the table in the aspx :</p>

<pre><code>&lt;asp:Table ID="Distances" runat="server" ViewStateMode="Inherit"&gt;&lt;/asp:Table&gt;
</code></pre>

<p>Then in code behind after creating all the rows and cells, I add a textbox into some of them :</p>

<pre><code>Distances.Rows[j].Cells[i].Controls.Add(CreateTB(distance.ToString(), (i + j * rows).ToString(), false));

    protected TextBox CreateTB(string text, string id, bool ebanled = true)
    {
        TextBox tb = new TextBox() { Text = text, ID = id, Enabled = ebanled};
        tb.TextChanged += new EventHandler(OnTBChanged);
        return tb;
    }
</code></pre>
