Removing Menu Item

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 92
Reputation: bharanidharanit is an unknown quantity at this point 
Solved Threads: 2
bharanidharanit bharanidharanit is offline Offline
Junior Poster in Training

Removing Menu Item

 
0
  #1
May 14th, 2009
Hello,
I am using Visual Web Developer 2008.
I am using menu control binded to site map.
So when the user role is administrator, i want to remove the menu item from the menu.
I used the coding but not working.

  1. If page.user.isinrole("Administrator") then
  2. menu1.items.remove(menu1.items.find("Forums")
  3. End if
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 6
Reputation: tonykmathew is an unknown quantity at this point 
Solved Threads: 0
tonykmathew tonykmathew is offline Offline
Newbie Poster

Re: Removing Menu Item

 
0
  #2
May 14th, 2009
Try the logic in

  1. protected void Menu_MenuItemDataBound(object sender, EventArgs e)
  2.  
  3. {
  4.  
  5. }
Last edited by peter_budo; May 15th, 2009 at 7:33 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 92
Reputation: bharanidharanit is an unknown quantity at this point 
Solved Threads: 2
bharanidharanit bharanidharanit is offline Offline
Junior Poster in Training

Re: Removing Menu Item

 
0
  #3
May 14th, 2009
i am using filesytem as vb not c#.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC