MasterPage RadMenu item visible only on 1 page

3 posts, 1 answers
  1. James
    James avatar
    8 posts
    Member since:
    Dec 2012

    Posted 11 Jul 2014 Link to this post

    I have a RadMenu defined to my MasterPage and would like to have one of the items visible only on 1 page.  I set the visibility to false for that item in the MasterPage.vb is there a way to set that to true from another page that is using that MasterPage?

    Thanks
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 Jul 2014 in reply to James Link to this post

    Hi James,

    Please try the below VB code snippet to achieve your scenario.

    VB:
    Protected Sub Page_Load(sender As Object, e As EventArgs)
        Dim menu As RadMenu = DirectCast(Me.Page.Master.FindControl("rmenuDemoItems"), RadMenu)
        menu.FindItemByText("Item1").Visible = True
    End Sub

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. James
    James avatar
    8 posts
    Member since:
    Dec 2012

    Posted 14 Jul 2014 in reply to Shinu Link to this post

    That did the trick!.
    Thank You
Back to Top