Link to home
Start Free TrialLog in
Avatar of Abdu_Allah
Abdu_Allah

asked on

How to expand treeview control which is a member of master page from Content page?

How to expand treeview control which is a member of master page from Content page?  I'm doing like the following but it does not work:

    Protected Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete
        Dim trvwTasks As TreeView = DirectCast(Master.FindControl("trvwTask"), TreeView)
        trvwTasks.ExpandAll()
    End Sub
ASKER CERTIFIED SOLUTION
Avatar of Jorge Paulino
Jorge Paulino
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have you tried doing it in Page_Load instead of Page_LoadComplete?
Avatar of micjones
micjones

Is there a c# equivalent to the above code?  I'm trying to do the same thing.  Thanks.

mj
Have you tried to change the brackets ?