Author: mxstar45 | Posted on: 8/3/2010 2:29:16 PM | Views : 323

Hello,


I have an admin page. Depending on whether you are an Admin or a troop leader,  you see two different pages.  I have a drop down list that has "troop", "my troop", and "all" as list items on the front end.  But i only want the Admin to be able to see the "All" list item.  The troop leader should not be able to see it.  
So I have this... which removes the "All" list item, but it removes it from both admin pages.  

ListItem mylistItem = reportDropDownList.Items.FindByText("All"); reportDropDownList.Items.Remove(mylistItem);



Then I decided to make an IF statement, to select the appropriate role and decide if the list item should be selected. But for some reason I can't get my program to read the "IsUserInRole"

if (Roles ...

Go to the complete details ...