New user default Role

V

Vear

hi,

Is there a way when a New User is created through the ASP.NET 2.0 new user
control that he is placed into a default Role? I'm using VB and I would think
I probably have to create a stored procedure to the aspnet db. I'm not sure
if there is just a way to set the default.
 
D

Dominick Baier [DevelopMentor]

you can handle the CreatedUser event of the CreateUserWizard control to add
the user to a role

protected void _createUser_CreatedUser(
object sender, EventArgs e)
{
// add the user to a standard role after registration
Roles.AddUserToRole(_createUser.UserName, "User");
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top