An error has occurred in the code I posted. In the last line of my code, I added a new line to the collection of controls:
output.Controls.Add(hRow)
Do not do this. It seems to have circumvented some of the properties unique to ASP.NET TableRows in the end. In this case, he ignored the TableSection property, even though it was set correctly. Instead, you should add rows to the row collection:
output.Rows.Add(hRow)
source share