11 March, 2009

Add user to a role using CreateUserWizard.

It's mutch simpler than you might thought. Just double click on your CreateUserWizard and add a line between the lines what appeared.

1 protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
2 {
3 Roles.AddUserToRole(CreateUserWizard1.UserName, "Role name as string");
4 }

2 comments: