lifanvc wrote:
li.ID = "S_SpcName";
You defined a name 'S_SpcName' to a
LABEL control
lifanvc wrote:
((TableCell)ph.FindControl("S_SpcName")).Text = itemValue.ToString();
You are trying to get this label control's value but casting it into a TableCell! Thats wrong...
Findcontrol and cast it into it's original form to access the values.
Further, all your names in code shared are not write. You use 'hp' for placeholder but add control lb to some 'c' (not defined)
Then you add 'lb' as new label but assign an ID to 'li' (again not defined) => i assume all those mistakes while sharing code here and not in your application.