i've got a few Textboxes and I want to loop through them and check if they contain a value, and if they do, put it into an array.
The textboxes are called txtText1, txtText2....txtText12. This is what I got so far:
for (int i = 1; i < 13; i++)
{
if(txtText[i] != String.Empty)
{
TextArray[i] = Convert.ToString(txtText[i].Text);
}
}
..but txtText[i] is not allowed.
How can I loop through these boxes?