Imports System
Imports System.Data
Imports System.Configuration
Imports System.Collections
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls

Partial Public Class TreeView_Templates_Template
    Inherits System.Web.UI.UserControl

    'Item's variable (optional) 
    Public TreeViewElement As APNSoft.WebControls.TreeViewElement = Nothing

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

        'Item's Data (optional)
        Dim ItemsData As String = ""
        If TreeViewElement IsNot Nothing Then
            ItemsData = "ItemID: " & _
            TreeViewElement.id
            ItemsData &= ", Title: " & _
            TreeViewElement.title
        End If



        'Add Header
        lblHeader.Text = " on <b>" & _
            Date.Now.ToString("ddd dd MMM, yyyy") & "</b>:"


        'Create Table
        Dim myTable As New Table()
        myTable.Attributes.Add("width", "400")
        myTable.Attributes.Add("cellpadding", "4")
        myTable.Attributes.Add("style", "white-space:normal;")

        Dim r As TableRow = Nothing
        Dim c As TableCell = Nothing


        'Add Row
        r = New TableRow()
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<img src='~/TreeView/Images/tvHowDo.jpg' vspace=2 border=1 width=60 height=60 />"))
        r.Cells.Add(c)
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<b>06:00 HOW DO THEY DO IT?</b><br/><small>How do wipers keep windscreens clear, how do they launch a rocket into space and how do they make the perfect lenses for modern binoculars?</small>"))
        r.Cells.Add(c)
        myTable.Rows.Add(r)


        'Add Row
        r = New TableRow()
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<img src='~/TreeView/Images/tvHowIts.jpg' vspace=2 border=1 width=60 height=60 />"))
        r.Cells.Add(c)
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<b>07:00 HOW IT'S MADE</b><br/><small>Cranberries, cotton yarns and road signs. More everyday objects are put under the microscope as we find out how they are made.</small>"))
        r.Cells.Add(c)
        myTable.Rows.Add(r)


        'Add Row
        r = New TableRow()
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<img src='~/TreeView/Images/tvExtreme.jpg' vspace=2 border=1 width=60 height=60 />"))
        r.Cells.Add(c)
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<b>08:00 EXTREME ENGINEERING</b><br/><small>Danny Forster goes behind the scenes at the Port of Rotterdam, where crews are in the middle of the largest Earth-moving project in history - all to triple the port's capacity.</small>"))
        r.Cells.Add(c)
        myTable.Rows.Add(r)


        'Add Row
        r = New TableRow()
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<img src='~/TreeView/Images/tvFutureWeap.jpg' vspace=2 border=1 width=60 height=60 />"))
        r.Cells.Add(c)
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<b>09:00 FUTURE WEAPONS</b><br/><small>Discover front line weapons, including the XM307 grenade launcher, hi-tech equipment for combat soldiers and the Stryker family of fighting vehicles.</small>"))
        r.Cells.Add(c)
        myTable.Rows.Add(r)


        'Add Row
        r = New TableRow()
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<img src='~/TreeView/Images/tvMyth.jpg' vspace=2 border=1 width=60 height=60 />"))
        r.Cells.Add(c)
        c = New TableCell()
        c.Controls.Add(New LiteralControl("<b>10:00 MYTHBUSTERS</b><br/><small>Adam and Jamie investigate whether an action hero can protect his cast members from a grenade blast and test an internet video with an outrageous claim.</small>"))
        r.Cells.Add(c)
        myTable.Rows.Add(r)


        'Add Table to the Place Holder
        phSchedule.Controls.Add(myTable)
    End Sub
End Class