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

How I can show and hide some controls regarding as the permissions of the user (admin,normal user) for example if user is admin the edit button appear !
Posted
Comments
raju melveetilpurayil 4-Sep-10 22:50pm    
try to think, if you think, you avoid some basic questions here.

1 solution

if(!User.IsInRole("Admin"))
{
   editBtn.Visible = false;
}


A little common sense and cerebral activity goes a long way.
 
Share this answer
 
Comments
raju melveetilpurayil 4-Sep-10 22:48pm    
Reason for my vote of 5
yes ;)

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