How to get menu items from master on Content page

Discussion in 'ASP .Net' started by SAL, Jun 18, 2007.

  1. SAL

    SAL Guest

    Hello,
    I have a menu on my Master page that I want to access from my content page.
    I seem to be able to get the menu via either:
    dim mnu as Menu = Master.FindControl("Menu1")
    or
    dim mnu as Menu = Me.Form.Parent.FindControl("Menu1")

    The only problem is that when I query mnu for HasControls it returns false
    and Items.Count is 0 as well.
    What I'd like to do is disable a menu item choice from certain pages.

    I've tried to do this from the Page_load and PageLoad_completed from the
    content pages.

    Any help on this???

    S
     
    SAL, Jun 18, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    872
  2. Replies:
    7
    Views:
    4,846
    Pushpadant
    Jul 3, 2006
  3. Laith Zraikat
    Replies:
    3
    Views:
    1,443
    Walter Wang [MSFT]
    Jul 6, 2006
  4. Rolf Welskes
    Replies:
    7
    Views:
    1,207
    Steven Cheng[MSFT]
    Aug 22, 2006
  5. Larry Bud
    Replies:
    13
    Views:
    8,250
    Larry Bud
    Jan 7, 2008
  6. John
    Replies:
    2
    Views:
    1,130
  7. Greg G
    Replies:
    0
    Views:
    307
    Greg G
    Nov 3, 2007
  8. DCC700
    Replies:
    1
    Views:
    1,489
    DCC700
    Apr 23, 2009
Loading...