Welcome to WebmasterWorld Guest from 18.208.211.150

Forum Moderators: ocean10000

Message Too Old, No Replies

SQL Membership Provider Create User

     
4:46 pm on Aug 13, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 10, 2008
posts: 1130
votes: 0


I need to create a customer add user wizard using the asp.net sql membership providers using visual basic. I know that a lot happens in the background when you use the generic create user wizard. I was wondering if there are any VB methodes like memberhsip.createuser where you would pass in the username and password and what not. If not, is there a good tutorial on the stored procedures I would have to call to create a user manually but still insert everything into the proper tables? Thanks
5:03 pm on Aug 13, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 1, 2005
posts:732
votes: 0


It's actually fairly easy, there is a CreateUser Method available:

Dim status As MembershipCreateStatus
Dim user As MembershipUser = Membership.CreateUser(txtUserName.Text, txtPass.Text, txtEmail.Text, txtSecretQuestion.Text, txtSecretAnswer.Text, False, status)

If status = MembershipCreateStatus.Success Then
' Member created succesfully, send email or whatever
End If

Here is some more info from MSDN [msdn.microsoft.com]

5:16 pm on Aug 13, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 10, 2008
posts: 1130
votes: 0


That's exactly what I was looking for. Thanks,