Hi, i am creating up to 10 textboxes using the following code:
if (textBoxIndex != 11)
{
TextBox field = new TextBox();
field.Name = "field" + textBoxIndex.ToString();
textBoxIndex++;
field.Size = new Size(200, 20);
panel1.Controls.Add(field);
}
else
{
MessageBox.Show("A Maximum of 10 Areas is Supported");
}
What I need to do now is have a button that removes the text boxes from bottom to top, but there may not neccessarily be 10 textboxes present their may only be five for example and I need some help with this please.