i have a form with controls that show productinformation.
now i have 10 textboxes named tbxPrice1 -> tbxPrice10 .
in my artikecleobject exists a property list
now i want to fill my 10 textboxes in a loop against my articlepricelist property.
If the articlepricelist contains 3 elements, the first 3 textboxes tbxPrice1,tbxPrice2 and tbxPrice3 should be filled.
If the articlepricelist is empty, no textbox should be filled.
Has anybody an idea, how to do this ?
by jo
prakash kuttiPosted Jun 29, 2009, 10:32 AM
for (i = 0; i < count; i++)
{
Control[] ctrls = Form1.Controls.Find("Textbox1", false);
TextBox txtbox = (TextBox)ctrls[i];
arr[i] = txtbox.Text;
}
I hope this coding helps to get values from dynamically created texboxes