for (int j = 0; j < colsCount; j++)
{
TableCell cell = new TableCell();
Label lbl = new Label();
lbl.Text = "label" + i;
lbl.ID = "labelRow_" + i + "Col_" + j;
cell.Controls.Add(lbl);
TextBox tb = new TextBox();
tb.ID = "TextBoxRow_" + i + "Col_" + j;
cell.Controls.Add(tb);
row.Cells.Add(cell);
}
In this way u can change the text name of the label.
If u want to give different to different labels than use switch case or if clause