View Single Post
  #3 (permalink)  
Old January 1st, 2011, 10:27 PM
skachy skachy is offline
Registered User
 
Join Date: Dec 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Imar View Post
Hi there,


Code:
 
deleteButton.Visible = Roles.IsUserInRole("Managers");
Could the difference in the name of the role (Manager versus Managers) be the problem here?

Cheers,

Imar
Hi Imar,

Thanks for the reply.
I mean I am signed in as a Manager user and "Managers" is checked for this user under Roles.
I also changed the code as you suggested to the following and saved/ran, but i get the same results.
Code:
deleteButton.Visible = Roles.IsUserInRole("Manager");
The switch statement fails so it does not even get to the above statement
Code:
switch (e.Item.ItemType)
Can you please suggest what else could be wrong?

Suhail
Reply With Quote