I am trying to create a tab panel with multiple dynamic portals on it. I would like to be able to dynamically add tabs with portals based on criteria from a database. However, I don't seem to be able to create the PortalColumn, LayoutColumn, ColumnLayout and Portal programmatically...

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Page4.aspx.vb" Inherits="HomePage.Page4" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head2" runat="server">
    <title>The Magazine Manager</title>
    
    <script runat="server">                   
        Protected Overloads Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            'load the navigation menu
            If Not Page.IsPostBack Then
                CreatePortal()
            End If
            
        End Sub
        
        Private Sub CreatePortal()
            'set up portlets
            Dim Portlets As Integer = 2
            Dim Portlet As Integer
            
            Dim ColumnIndex As Integer
            
            'first column
            ColumnIndex = 1
            
            Dim TabTemp As New Tab
            TabTemp.Title = "Tab2"
            
            Dim PortalTemp As New Portal
            
            Dim ColumnLayoutTemp As New ColumnLayout


            Dim LayoutColumnTemp As New LayoutColumn


            Dim PortalColumnTemp As New PortalColumn
            
            Dim AnchorLayoutTemp As New AnchorLayout
            AnchorLayoutTemp.ID = "AnchorLayout" &amp; ColumnIndex


            For Portlet = 1 To Portlets
                Dim PortletTemp As New Portlet
                PortletTemp.ID = String.Format("Component{0}", Portlet)
                PortletTemp.Title = String.Format("Component{0}", Portlet)
                'PortletTemp.Height = 200


                Dim al As New LoadConfig
                al.Url = "http://www.google.com"
                al.ShowMask = True
                al.Mode = LoadMode.IFrame
                PortletTemp.Load(al)


                Dim AnchorTemp As New Anchor
                AnchorTemp.Items.Add(PortletTemp)


                AnchorLayoutTemp.Anchors.Add(AnchorTemp)
            Next


            'THIS WORKS FINE, IT ADDS THE DYNAMIC PORTLETS TO THE EXISTING PORTAL
            'PortalColumn1.Items.Add(AnchorLayoutTemp)
            
            'THIS DOES NOT WORK, I get "insertAdjacentHTML" as an error
            PortalColumnTemp.Items.Add(AnchorLayoutTemp)


            LayoutColumnTemp.Items.Add(PortalColumnTemp)


            ColumnLayoutTemp.Columns.Add(LayoutColumnTemp)
            
            PortalTemp.Items.Add(ColumnLayoutTemp)
            
            TabTemp.Items.Add(PortalTemp)
            
            TabPanel1.Tabs.Add(TabTemp)
        End Sub


    </script>       
</head>
<body>
    <form id="form1" runat="server">
    <ext:ScriptManager ID="ScriptManager1" runat="server" ScriptMode="Debug" />               
    <ext:Panel ID="Panel7" runat="server">
        <Body>
            <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Height="500" Plain="true" EnableTabScroll="true">
                <Tabs>                                        
                    <ext:Tab ID="Tab1" runat="server" Title="Tab 1" ShowIFrameMask="true" AutoScroll="true">
                    <Body>      
                    <ext:Portal ID="MMPortal" runat="server" Title="" Border="false">                                            
                        <Body>
                            <ext:ColumnLayout ID="ColumnLayout0" runat="server">
                                <ext:LayoutColumn>
                                    <ext:PortalColumn ID="PortalColumn1" runat="server">
                                    </ext:PortalColumn>
                                </ext:LayoutColumn>            
                            </ext:ColumnLayout>
                        </Body>
                    </ext:Portal> 
                    </Body>                                        
                    </ext:Tab>
                </Tabs>
            </ext:TabPanel>   
        </Body>
    </ext:Panel>                                                                    
    </form>
</body>
</html>