0
votes

I have 3 Roles in Membership Provider such as:

  • PRINCIPAL
  • TEACHER
  • STUDENT

A single User may have both "PRINCIPAL" and "TEACHER" Role. Soon after,that particular user (who have the 2 Roles) Logged In, I got Bind all roles in a RadioButtonList for that User.

Now, He want to select one Role after Logged In and My Home Page should be for that particular Role of that User.

How to assign Role for the User dynamically?

1

1 Answers

0
votes

If you are working with the Membership API from Microsoft you can assign role like this

Roles.AddUserToRole("UserName", "RoleName");

Click here for further informations