treeview with expand, collapse and change action (VB.net) : Tree « Components « ASP.Net

ASP.Net
1. ADO.net Database
2. Ajax
3. Asp Control
4. Collections
5. Components
6. Data Binding
7. Development
8. File Directory
9. HTML Control
10. Language Basics
11. Login Security
12. Mobile Control
13. Network
14. Page
15. Request
16. Response
17. Server
18. Session Cookie
19. Sitemap
20. Theme Style
21. User Control and Master Page
22. Validation by Control
23. Validation by Function
24. WebPart
25. WPF
26. XML
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
ASP.Net » Components » Tree 
treeview with expand, collapse and change action (VB.net)

<%@ Page Language=VB Debug=true %>
<%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
<%@ Register TagPrefix="IEControls" 
    Namespace="Microsoft.Web.UI.WebControls" 
    Assembly ="Microsoft.Web.UI.WebControls"
%>
<script runat=server>
Sub TreeChange(ByVal Sender as Object, _
    ByVal E as TreeViewSelectEventArgs)
    lblMessage.Text = "You selected node " & E.NewNode.ToString() _
        " and moved from node " & E.OldNode.ToString() "."
End Sub
Sub TreeExpand(ByVal Sender as Object, _
    ByVal E as TreeViewClickEventArgs)
    lblMessage2.Text = "You expanded node " _
        & E.Node.ToString() "."

End Sub
Sub TreeCollapse(ByVal Sender as Object, _
    ByVal E as TreeViewClickEventArgs)
    lblMessage2.Text = "You collapsed node " _
        & E.Node.ToString() "."
End Sub
</SCRIPT>
<HTML>
<HEAD>
<TITLE>TreeView Control Sample Page</TITLE>
</HEAD>
<BODY>
<form runat="server">
<Font Face="Tahoma">
<asp:Label
    id="lblMessage"
    runat="server"
/>
<BR>
<asp:Label
    id="lblMessage2"
    runat="server"
/>
<BR><BR>
<IEControls:treeview
    id="MyTree3"
    onSelectedIndexChanged="TreeChange"
    onexpand="TreeExpand" 
    oncollapse="TreeCollapse" 
    AutoPostBack="True"
    BackColor="LightYellow"
    BorderStyle=9
    BorderWidth=3
    BorderColor="DarkBlue"
    runat="server">
    <IEControls:treenode Text="A">
        <IEControls:treenode Text="A1"/>
        <IEControls:treenode Text="A2"/>
        <IEControls:treenode Text="A3">
            <IEControls:treenode Text="A31"/>
            <IEControls:treenode Text="A32"/>
            <IEControls:treenode Text="A33"/>
        </IEControls:treenode>
    </IEControls:treenode>
    <IEControls:treenode Text="B">
        <IEControls:treenode Text="B1"/>
        <IEControls:treenode Text="B2"/>
        <IEControls:treenode Text="B3"/>
        <IEControls:treenode Text="B4"/>
    </IEControls:treenode>
</IEControls:treeview>
</Font>
</Form>
</BODY>
</HTML>

           
       
Related examples in the same category
1. IE control tree with link node and frame control (C#)
2. IE control treeview with link node (C#)
3. Tree with style (C#)
4. Static WebControls treeview (VB.net)
5. Treeview with custom icon (VB.net)
6. Treeview with navigational URL (VB.net)
7. Working with TreeNode Controls in a TreeView Control (VB.net)
8. Setting Styles in a TreeView Control (VB.net)
9. Tree Node selected event in a TreeView (VB.net)
10. Using Links with TreeNode Controls in a TreeView Control (VB.net)
11. Using Images with TreeNode Controls in a TreeView Control (VB.net)
12. TreeNode Expand action (VB.net)
13. TreeNode Collapses action (VB.net)
14. Treeview and checkbox treenode (VB.net)
15. On Tree Node Populate Event (C#)
16. Add tree node (C#)
17. Tree node with hyper link (C#)
18. Treeview image: XP file explore style (C#)
19. Tree view node style (C#)
20. On tree node selection changed event (C#)
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.