Add asp:tablecell : Table « Asp Control « ASP.Net






Add asp:tablecell

<%@ Page Language=VB Debug=true %>
<script runat=server>
Sub Page_Load(ByVal Sender as Object, ByVal E as EventArgs)
    Dim MyTable = New Table
    Dim NumRows as Integer
    Dim NumColumns as Integer
    For NumRows = 1 to 3
        Dim TheRow = New TableRow
        For NumColumns = 1 to 4
            Dim TheCell = New TableCell
            TheCell.Text = NumRows & "," & NumColumns
            TheRow.Cells.Add(TheCell)
        Next
        MyTable.Rows.Add(TheRow)
    Next
    frmMyPage.Controls.Add(MyTable)
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>Creating an HTML Table Using the Table Control</TITLE>
</HEAD>
<BODY LEFTMARGIN="40">
<form id="frmMyPage" runat="server">
</form>
</BODY>
</HTML>
           
       








Related examples in the same category

1.Add row to asp:table
2.asp:table with static data
3.Layout controls in an asp:Table
4.Table Footer Row