Add control to TableCell object

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top