I have programmatically created a label and would now like to align the text to the center. I am using C# with ASP.NET so cannot use the usual Windows.Form methods.

foreach (string grade in eNumGradesList)
{
lblENumGrade = new Label();
cellENumGrade = new TableCell();

// Position cells and specify details
lblENumGrade.Text = grade;
this.lblENumGrade.Text = this.lblENumGrade.Text.PadLeft(this.lblENumGrade.Text.Length + 25); // NOT WORKING
//lblENumGrade.Text.PadLeft(20); //NOT WORKING EITHER
cellENumGrade.Controls.Add(lblENumGrade);
cellENumGrade.BorderColor = System.Drawing.Color.Blue;
rowHeader.Controls.Add(cellENumGrade);
}