D
Durango2008
Hi, I have a form which contains a table(Table1), within that table I have
label with an ID set to "1A".
Using something like:
if(Table1.FindControl("1B") != null)
{
labelID = "1C";
}
else if(Table1.FindControl("1A") != null)
{
labelID = "1B";
}
Label lblType = new Label();
lblType.ID = labelID;
TableRow tr = new TableRow();
TableCell tc = new TableCell();
tc.HorizontalAlign = HorizontalAlign.Center;
tr.Controls.Add(tc);
tc.Controls.Add(typeLabel);
Table11.Controls.Add(tr);
So whenever this code runs if it finds the latest Label for example "1B" it
will add a new tr and cell with an updated label "1C" or if it finds "1A" it
will update with new label "1B".
It does work with the initial label that is set in the .aspx file however
when run it again it will not find the new label to reupdate things.
Anyone have any suggestions?
thank you for any advice.
label with an ID set to "1A".
Using something like:
if(Table1.FindControl("1B") != null)
{
labelID = "1C";
}
else if(Table1.FindControl("1A") != null)
{
labelID = "1B";
}
Label lblType = new Label();
lblType.ID = labelID;
TableRow tr = new TableRow();
TableCell tc = new TableCell();
tc.HorizontalAlign = HorizontalAlign.Center;
tr.Controls.Add(tc);
tc.Controls.Add(typeLabel);
Table11.Controls.Add(tr);
So whenever this code runs if it finds the latest Label for example "1B" it
will add a new tr and cell with an updated label "1C" or if it finds "1A" it
will update with new label "1B".
It does work with the initial label that is set in the .aspx file however
when run it again it will not find the new label to reupdate things.
Anyone have any suggestions?
thank you for any advice.