You could either not use the form designer to create them, by creating them
in your constructor like this:
public Form() {
InitializeComponent();
TextBox[] txts = new TextBox[10];
for (int i = 0; i < 10; i++) {
TextBox t = new TextBox();
t.Location =
t.Size =
t.Text =
txts.Add(t);
Controls.Add(t);
}
}
or you could assign them afterwards manually
TextBox[] txts = new TextBox[10];
txts[0] = textBox1; txts[1] = textBox2; etc;
Chris
"Dave Petersen" <da*******************@carlson.com> wrote in message
news:#V**************@TK2MSFTNGP10.phx.gbl...
I have 10 textboxes on my page, textbox1 - textbox10. Rather than modify
them individually, I would like to modify them with a variable something
like this:
for (int i = 0; i <= 10; i++)
{
textbox[i].text = "some text";
}
Is this possible? Would I need to create some kind of control array?
Thanks,
Dave