NavigationMenu and MenuItems with Databinding

Discussion in 'ASP .Net Web Controls' started by doug, Dec 5, 2005.

  1. doug

    doug Guest

    hi,

    i am implementing a NavigationMenu. I am BINDING this to a MenuSource.

    i wish to set enable = false for select menu items that are not applicable
    based upon the state of a user.

    i am always getting a NavigationMenu.Items with a count of 0. i thought
    capturing at prerender would do the trick.

    and yes, i am getting items and the menu is displayed correctly.

    doug

    work below.

    protected void Page_PreRender(object sender, EventArgs e)
    {
    MasterPage m = (MasterPage)sender;
    Menu mn = m.NavigationMenu;
    // MenuItem homeMenuItem = mn.Items[0];

    }


    <asp:menu id="NavigationMenu"
    disappearafter="2000"
    staticdisplaylevels="2"
    staticsubmenuindent="10"
    orientation="Horizontal"
    font-names="Arial"
    datasourceid="MenuSource"
    runat="server">
    <staticmenuitemstyle backcolor="LightSteelBlue"
    forecolor="Black"/>
    </asp:menu>

    <asp:SiteMapDataSource id="MenuSource"
    runat="server"/>
    doug, Dec 5, 2005
    #1
    1. Advertising

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. Jeff

    adding menuitems

    Jeff, Jul 24, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    333
  2. Jeff

    newbie: problem with menuitems

    Jeff, Jul 27, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    415
  3. multiplex77

    Creating rounded mouseover menuitems

    multiplex77, Sep 30, 2006, in forum: .NET
    Replies:
    0
    Views:
    612
    multiplex77
    Sep 30, 2006
  4. Julia B
    Replies:
    1
    Views:
    872
    Julia B
    Mar 19, 2008
  5. Replies:
    0
    Views:
    274
Loading...

Share This Page