Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > NavigationMenu and MenuItems with Databinding

Reply
Thread Tools

NavigationMenu and MenuItems with Databinding

 
 
doug
Guest
Posts: n/a
 
      12-05-2005
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"/>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controls inside of TreeNodes and MenuItems? PopeDarren@gmail.com ASP .Net 0 04-07-2008 07:57 PM
How to populate menuitems (parent and child) programmatically Julia B ASP .Net 1 03-19-2008 04:23 PM
Creating rounded mouseover menuitems multiplex77 ASP .Net 0 09-30-2006 01:16 PM
newbie: problem with menuitems Jeff ASP .Net 1 07-28-2006 12:25 AM
adding menuitems Jeff ASP .Net 0 07-24-2006 12:09 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57