Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,

I have Javascript menu, can anyone tell how to give user rights for menu? like if admin is logged in then menu should shows all option and if normal user has logged in then it will show limited options. All using WEB.CONFIG.
Posted
Updated 26-Oct-10 0:20am
v3

1 solution

Well, all you need to do is,
1. based on Web.config fetch the Menu items to be displayed
2. based on the menu items fetched, create menu at runtime
3. use this runtime created menu and display it

Other way:
1. Have a list of menu items (all of them - same for all)
2. based on Web.Config, find the menu items accessbile for a given role
3. based on current users role, enable/disable the menu items.

Try!
 
Share this answer
 
Comments
amshan1 26-Oct-10 6:29am    
thanks for your reply, could u give me sample or links?
Sandeep Mewara 26-Oct-10 6:31am    
You got to try first of your own... whats the point of learning if you just copy-paste?
raju melveetilpurayil 26-Oct-10 16:04pm    
Sandeep Mewara you are correct.

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