Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Brian Watkins #1
Fill Tabstrip Control dynamically with multiple treeview controls
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 Guest
-
problem whil adding user control dynamically multiple times
I have two buttons add and save on my aspx page as and when i click on save button ,i want to load user control on form it works fine but when i... -
Composite Web Control and Dynamically Created Children Controls.
Hi I am developing a web control which creates other web controls. During the OnInit of the my web control I read an Xml file which tells my web... -
Create a web tabstrip control
Hi. I need to do a tabstrip custom control for my web apps get the values of the title os the tabs from a xml file. I can render one table os... -
Retrieving Values from dynamically created controls in a user control
Hi, Dynamic control should be load every time page load, even on post back. take out control creation from IsPostBack condition. Natty Gur ... -
TabStrip controls
Hello, Could anyone recommend a good ASP.NET TabStrip server control? The IE webcontrol requires IE 5.5 and higher but I have to support as...



Reply With Quote

