Conditional display of menu

  1. #1

    Conditional display of menu

    Dear all,

    I have a menu in my application and needs to restrict the access to the menus. For example, only administrator needs to access the admin menu.. other users need not view them at all.. how to I display the menu if the user is as admin and hide it if the user is an ordinary user?

    I tried doing:
    <%if(check-condition){ %>
    <ext:Button ID="ToolbarButton2" runat="server" Icon="AsteriskRed" Text="Administrator">
    .
    .
    .
    But system says "Code blocks are not supported in this context"

    Any suggests?

    Thanks in advance,
    Best Regards,

    Abdel Raoof Olakara
  2. #2

    RE: Conditional display of menu

    Hi,

    What about to set Visible=false to the menu or button?
  3. #3

    RE: Conditional display of menu


    Hi Vladimir,

    But then, I will doing this setting on the server side code.. right? lets say, during Page_Load method, I check if the menu needs to be displayed and then set it's visibility.. I tried the code and its working fine.

    Thanks for the help,
    Best Regards,

    Abdel Raoof Olakara


Similar Threads

  1. Replies: 2
    Last Post: Apr 02, 2012, 7:48 AM
  2. Conditional data display
    By huzzy143 in forum 1.x Help
    Replies: 10
    Last Post: Aug 26, 2011, 3:14 PM
  3. Menu Position - Always display up instead of down
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: May 07, 2010, 10:48 AM
  4. Replies: 1
    Last Post: Apr 30, 2010, 3:11 PM
  5. How to display context menu?
    By dbassett74 in forum 1.x Help
    Replies: 4
    Last Post: May 14, 2009, 2:37 PM

Posting Permissions