friens,
I Have a grid of 100 or more text boxes (HTML OR ASP.NET) each will be containing a text value of fixed length, need ALL of these passed back to the back end form for mass updating of the database..
i can do this by simple going through each of the controls .text property in code behind
however that makes the code to big and ugly.
i was wondering if there is any why to go through each control using some controled looping structure and retrive data
i.e.
Private List<string> getdata()
{
Private List<String> MyList = new List<string>();
foreach (Textbox)control txbControl in ....// don't know what this will be
{
MyList.Add(txbControl.text);
}
}
please note that all of this textboxes have unique ID tag on the page i.e.
<tablr>
<tbody>
<tr>
<td>
<asp:TextBox ID="TxB_Customize1" runat="server"></asp:TextBox>
<td/>
<td>
<asp:TextBox ID="TxB_Customize2" runat="server"></asp:TextBox>
<td/>
<td>
<asp:TextBox ID="TxB_Customize3" runat="server"></asp:TextBox>
... ... ...
sorry forgot to mention this, text boxes are grouped in columns and each textbox in a given column shares similar name i.e. "Txb_Customize" in the given instance.
so when retriving the values i also need to know from where its comming from (may be textbox ID)