Click here to Skip to main content
15,905,563 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi guys,

I have menu list,
where i have display this list based on the usertype.

if its admin then it should display all else on usertype.

Can anyone plzzz, help me.


Updated 4-Apr-14 21:25pm

1 solution

Firstly, you need to add check for user type logged in the application.
NOW let us assume UserType = 1 for Admin and rest if for non-admin.

Now by default set the visibility/Display to false/none for the menu item you wanted to show to the admin only. Now at login check the user type.
if(UserType == 1)
//   Show the admin menu type by setting visibility/Display to true/block 

Thus you can control the menu for usertype based applications. Do this coding on the page(usually masterpage) where you have menu html.
Share this answer
abdul subhan mohammed 6-Apr-14 4:49am    
Er. Puneet Goel 8-Apr-14 2:00am    
welcome :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900