OldTable
OldTable.aspx
1 2 3 4 5 6 7 8 9 | <%@ Register TagPrefix="cc1" Namespace="DamianM" Assembly="DamianM" %> <%@ Control Language="vb" AutoEventWireup="false" Codebehind="oldtable.aspx.vb" Inherits="DamianM.oldtable" %> <center> <asp:literal id="Literal1" runat="server"></asp:literal> </center> |
OldTable.aspx.vb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | Public Class oldtable Inherits System.Web.UI.UserControl Protected WithEvents Literal1 As System.Web.UI.WebControls.Literal Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'create the table Literal1.Text = " <table border="1" width="50%"><tbody> <tr>" 'create the title Literal1.Text += " <td colspan="2" align="center" bgcolor="silver">Server Created Table</td> </tr> " 'loop and create some rows Dim i As Integer For i = 0 To 10 Literal1.Text += " <tr bgcolor="#000999">" Literal1.Text += " <td>" + i.ToString + "</td> " Literal1.Text += " <td>this is row " + i.ToString + "</td> " Literal1.Text += "</tr> " Next Literal1.Text += " </tbody></table> " End Sub Private Sub InitializeComponent() End Sub End Class |



















