On postback lose value from dynamically created textbox gridview
<p>I dynamically create gridview, and in this grid I have template field also</p>

<pre><code>field.HeaderTemplate = New GridViewTemplate(ListItemType.Header, col.ColumnName)
field.ItemTemplate = New GridViewTemplate(ListItemType.Item, col.ColumnName)
grdEmpty.Columns.Add(bfield)
</code></pre>

<p>but when enter some value in text box in this template field i lose value on postback. And also on postback I lose all template field and i must re-create this grid.</p>

<p>My goal is: I have button and i want to add new row in this grid, but i want to have old value also.</p>

<p>I struggle with this all day, and any help is welcome.</p>

<p>Tnx,</p>
