Like all problems, we don't know if there are just 3 values, or say 1` to 15 values (labels on the page).
WORSE is WHY use a loop and HAVING to type in the label names - even into a array? (Defeats the WHOLE purpose of using a loop!).
So, lets assume a list, say 1 to 10 items, and thus:
Lable1
Lable2
... to 10, or 20, or 5 or 50!!!!
Ok, so not only do we need to deal with passing a list of say only 5 values, WE ALSO STILL have to blank out the ones that don't have a value (or did anyone here think of that????)
So, you can do it this way:
List<string> Mylist = new List<string> { "one", "Two", "Three", "Four" };
for (int i = 1; i <= 10; i++)
{
Label MyLabel = Page.FindControl("Label" + i) as Label;
if (i <= Mylist.Count)
MyLabel.Text = Mylist[i-1];
else
MyLabel.Text = "";
}
Above assumes we have Label1 to label10, but it would work for 5 or 50 or whatever how many you have.