J
jimi_xyz
Hi,
I current have a from with 12 textboxes, and want to index all of them,
i keep getting this error..
'System.Windows.Forms.Control.ControlCollection' does not contain a
definition for 'IndexOfKey'
I figure its because the the function IndexOfKey is not defined.. here
is the code..
for (i = 0; i < 12; i++)
{
int controlLocation = this.Controls.IndexOfKey("textBox" +
i.ToString());
//Now we access that control through the form.control
//array and set arr = the texbox.text
arr = Convert.ToInt32(this.Controls[controlLocation].Text);
}
My question is what would the definition of IndexOfKey look like, and
where would it go??
Thanks,
Jimmie
I current have a from with 12 textboxes, and want to index all of them,
i keep getting this error..
'System.Windows.Forms.Control.ControlCollection' does not contain a
definition for 'IndexOfKey'
I figure its because the the function IndexOfKey is not defined.. here
is the code..
for (i = 0; i < 12; i++)
{
int controlLocation = this.Controls.IndexOfKey("textBox" +
i.ToString());
//Now we access that control through the form.control
//array and set arr = the texbox.text
arr = Convert.ToInt32(this.Controls[controlLocation].Text);
}
My question is what would the definition of IndexOfKey look like, and
where would it go??
Thanks,
Jimmie