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

Posted on 2007-10-08
Last Modified: 2008-02-06
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)
    End Sub
Question by:Abdu_Allah
    LVL 48

    Accepted Solution

    Try this

    CType(Master.FindControl("trvwTask"), TreeView).ExplandAll()
    LVL 16

    Expert Comment

    Have you tried doing it in Page_Load instead of Page_LoadComplete?

    Expert Comment

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

    LVL 48

    Expert Comment

    Have you tried to change the brackets ?

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now