I have added my User's Role into the Form authentication, but i wan to be able to change the role when needed.
I understand that User.IsInRole returns a boolean to check if it is True or false tallied with the given string/role. like, User.IsInRole("Administrator").
But i wan to be able to change the role when needed..
is there a way?
User.SetRole or something?
This part of library User works together with the library Roles. As for example, I want to add to user "Nick1" the role of "SeeAll" you can do something like that:
Roles.AddUserToRole("Nick1", "SeeAll");
Then if you want to remove the role "SeeAll", you can use this:
Roles.RemoveUserFromRole("Nick1", "SeeAll");
Before that, you should configure and create all aspects of this library (if you want to use SQL Server or cookies to save the roles, which roles you want to use and so on.)
You have more details about Roles library here.