J
Jeff
hey
asp.net 2.0
I want to add a menu item to a menu on my webpage programatically. I've
tryed using the code below, but it doesn't add the menu item to the menu.
MenuItem menuItem = new MenuItem("Menu item text", "menuitemvalue",
"imageurl", "navigateurl");
Menu menu = (Menu) lvSidebar.FindControl("mnuSidebar");
menu.Items.Add(menuItem);
About my code:
lvSidebar is a Loginview
mnuSidebar is placed within the LoggedInTemplate
"MenuItem menuItem = new MenuItem("Menu item text", "menuitemvalue",
"imageurl", "navigateurl");", works
"Menu menu = (Menu) lvSidebar.FindControl("mnuSidebar");" works, FindControl
finds the mnuSidebar
Any suggestions to why my code don't add a menu item the web page?
Jeff
asp.net 2.0
I want to add a menu item to a menu on my webpage programatically. I've
tryed using the code below, but it doesn't add the menu item to the menu.
MenuItem menuItem = new MenuItem("Menu item text", "menuitemvalue",
"imageurl", "navigateurl");
Menu menu = (Menu) lvSidebar.FindControl("mnuSidebar");
menu.Items.Add(menuItem);
About my code:
lvSidebar is a Loginview
mnuSidebar is placed within the LoggedInTemplate
"MenuItem menuItem = new MenuItem("Menu item text", "menuitemvalue",
"imageurl", "navigateurl");", works
"Menu menu = (Menu) lvSidebar.FindControl("mnuSidebar");" works, FindControl
finds the mnuSidebar
Any suggestions to why my code don't add a menu item the web page?
Jeff