Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

VS 2012 To keep TreeView expanded after a new page is opened

newtovbnoob

New member
Joined
Jan 21, 2020
Messages
1
This is the current code I have and I'm trying to keep the expand open after each time I click on an item or refresh but nothing works so far. :-(

Code:
<asp:TreeView ID="TreeView1" ExpandDepth="0" runat="server"
                style="width:270px" ForeColor="Black"  HoverNodeStyle-BackColor ="LightBlue"
                ShowExpandCollapse="true" PopulateOnDemand="true" NodeWrap="true"  
               NodeStyle-CssClass="treeNode"
        RootNodeStyle-CssClass="rootNode"
        LeafNodeStyle-CssClass="leafNode" ViewStateMode="Enabled"
        ></asp:TreeView>


Code:
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        Dim Levels As String
        Levels = Request.QueryString("Level")
        If Not IsPostBack() Then
            'GetMenuItems()
            GetTreeViewItems()
        End If
 
Top