views:

18

answers:

1

i have a table (System.Web.UI.WebControls). each row does have three cells. in cells' controls collection i placed some controls

 TableCell cell = new TableCell();
                cell.Font.Bold = false;
                cell.BackColor = Color.FromName("lightblue");
                cell.Controls.Add(new LiteralControl("Дата"));
                row.Cells.Add(cell);
    TableCell c3 = new TableCell();
                    c3.Controls.Add(new CheckBox());
                    r.Cells.Add(c3);

i cant find the way to get values which this controls are holding alt text

i see that CheckBox stores a value, but i don't know how to get it. Can you tell me how?

+1  A: 

You need to cast it, like this:

bool ischecked = ((CheckBox)tc.Controls[0]).Checked;
Nick Craver
thank you very much.
Varyanica