I’m using the asp built in membership controls, etc. There is a new user control that I wanting to use but this doesn’t seem to give the option to set the roles for the user. Anyone know of how I can achieve this?
— Billy
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The basic idea is to use the System.Web.Security.Roles class and manually recreate the ASP.NET Configuration application yourself.
For example, you can use the
Roles.GetAllRoles()method to populate a dropdown or checkboxlist. You can use the Roles.AddUserToRole() method to assign roles to users.