Add control to TableCell object

  • Thread starter Thread starter Jeff User
  • Start date Start date
J

Jeff User

Hi all

VS 2003, .net1.1

I am trying to make a composite web control with a table and some
controls within.

In my C# code, I have created table object, then row objects and cell
objects. I want to use an asp: listBox in a table cell.

Table tbl = new Table();
TableRow r = new TableRow();
TableCell c = new TableCell();
ListBox lb = new ListBox();

// How do I add lb object to the cell here?

c . AddControl(lb); // No such animal

//Then
r.Cells.Add(c);
tbl.Rows.Add(r);


Thanks
Jeff
 
Back
Top