View Single Post
  #4 (permalink)  
Old October 21st, 2003, 01:27 PM
katsarosj katsarosj is offline
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts
Default

'Make sure you import namespace...
Imports System.Web.UI.WebControls
'If you don't you will have to add "System.Web.UI.WebControls" to the beginning of each (table, tablerow, tablecell)

'**********************
Dim tblTable as Table
Dim tblRow as TableRow
Dim tblCell as TableCell

tblTable = New Table
tblRow = New TableRow
tblCell = New TableCell

tblCell.Text = "This text would appear in the first column."
tblRow.Cells.Add(tblCell)

tblCell = New TableCell
tblCell.Text = "This text would appear in the second column."
tblRow.Cells.Add(tblCell)

tblTable.Rows.Add(tblRow)

frmFormName.Controls.Add(tblTable)

'**********************
Hope this helps.

J