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:
Code:
<%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
RE: Conditional display of menu
Hi,
What about to set Visible=false to the menu or button?
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