Hi all,
I have been able to assign roles to users based on what they select on a dropdownlist.
DDL consists of 3 options Company1 , Company2 , Company3
There are 2 Possible roles 3gtrainee , trainee
If user selects Company1 then they get added to Role training_3gtrainee
If user selects Company2 then they get added to Role training_trainee
If user selects Company3 then they get added to Role training_trainee
My issue is with an update page I have where a user can change from one role to another.
In my code I am trying to assign the new role to the user but remove the old role.
If I don't remove the old role then the user will exist in both..
i have tried the following.
Can someone help me with teh of else statement.
I think I have overdone the coding here.
Thx,
Ray..
If DDLCompany.SelectedValue = "Company1" And Roles.IsUserInRole(Page.User.Identity.Name, "tra ...
Go to the complete details ...