5

i am using asp.net built-in membership and role provider.

In my application Admin Create account for user.

currently i am assigning roles by going to asp.net configuration website.

kindly tell me how to add an extra step of Select Role in creat user account API.

Thanks.

2 Answers 2

8

Are you just asking how to assign a User to a Role?

Roles.AddUserToRole(userName, roleName); 

And to remove a role:

Roles.RemoveUserFromRole(userName, roleName); 
Sign up to request clarification or add additional context in comments.

Comments

1

Please refer to : http://www.asp.net/security/tutorials/assigning-roles-to-users-cs

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.