I created a TableCell with the TableCell.Text = "text from database" then i add TableCell control into an empty table during page load. I am trying to retrieve the text in the TableCell after a postback by user how should i do that?
my code:
TableRow tr = new TableRow();
tbl.Controls.Add(tr);
TableCell tc = new TableCell();
tc.Text = "<H1>" + GetAssessmentTitle(questionSetId) + "<H1>";
tc.Attributes.Add("name","title");
tc.Attributes.Add("id", "title");
tr.Controls.Add(tc);
I tried doing this by it only able to retrieve the name attribute of the TableCell which is "title" but what i need is the text of the TableCell.
for (int i = 0; i < r.Form.Keys.Count; i++)
{
if (r.Form.Keys[i] == "title")
{
}
}
Any help would be appreciated