Fill Tabstrip Control dynamically with multiple treeview controls

Discussion in 'ASP .Net Building Controls' started by Brian Watkins, Nov 20, 2003.

  1. I am trying to dyanmically add tabs to my tabstrip control and then build a
    different treecontrol for each tab on my tab control.
    Basically the Tabstrip control would have n number of tabs/pageviews and
    each pageview would have its own treeview.
    Any suggestions on how I could tweak the code below to make this whole thing
    dynamic? Thanks in advance

    Here is how I statically create the tabstrip with one tab and one treeview

    <%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
    <%@ Register TagPrefix="mytab" Namespace="Microsoft.Web.UI.WebControls"
    Assembly="Microsoft.Web.UI.WebControls %>
    <%@ register TagPrefix="mytree" Namespace="Microsoft.Web.UI.WebControls"
    Assembly ="Microsoft.Web.UI.WebControls" %>

    <script runat="server" >

    Sub Page_Load(sender as Object, e As EventArgs)

    IF Not IsPostBack Then
    Call FillTreeView()

    End IF

    End Sub

    Sub FillTreeView()

    'fill treeview code here

    End Sub

    <html>
    <head>
    <body>
    <form id=f1 runat="server">

    <mytab:TabStrip id="tsDocuments" runat="server" TargetID="mpHoriz">
    <mytab:Tab Text="Tab1" />
    <mytab:TabSeparator />
    </mytab:TabStrip>
    <mytab:MultiPage id="mpHoriz" runat="server">

    <mytab:pageView>
    <table>
    <tr>
    <td>
    <MYTREE:TREEVIEW ID="tvwDirectory" RUNAT="server" CHILDTYPE="Directory"
    <MYTREE:TREENODETYPE
    TYPE="Directory"
    CHILDTYPE="Files, Folders"
    />
    <MYTREE:TREENODETYPE
    TYPE="Folders"
    CHILDTYPE="Files, Folders"
    />
    <MYTREE:TREENODETYPE
    TYPE="Files"
    />
    </MYTREE:TREEVIEW>
    </td>
    </tr>
    </table>
    </mytab:pageView>

    </mytab:MultiPage>

    </FORM>
    </body>
    </html>
     
    Brian Watkins, Nov 20, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Fox

    TabStrip controls

    Mark Fox, Aug 7, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    357
    Mark Fox
    Aug 8, 2003
  2. Natasha

    TabStrip or Tab Controls

    Natasha, Aug 21, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    426
    Mark Fitzpatrick
    Aug 21, 2003
  3. Luqman
    Replies:
    1
    Views:
    713
    Alvin Bruney [MVP]
    Apr 20, 2007
  4. Burt

    Tabstrip control with multiple aspx pages?

    Burt, Sep 9, 2003, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    172
    Ken Cox [Microsoft MVP]
    Sep 10, 2003
  5. Brian Watkins
    Replies:
    1
    Views:
    243
    Alvin Bruney
    Nov 21, 2003
Loading...

Share This Page