CreateUser adds a new user to the data store and returns a MembershipUser object for the newly created user. If the user creation fails, you can retrieve a MembershipCreateStatus value from the status output parameter that indicates why user creation failed.
The CreateUser method will return nullNothingnullptra null reference (Nothing in Visual Basic) if password is an empty string or nullNothingnullptra null reference (Nothing in Visual Basic), username is an empty string or nullNothingnullptra null reference (Nothing in Visual Basic) or contains a comma (,), passwordQuestion is not nullNothingnullptra null reference (Nothing in Visual Basic) and is an empty string, or passwordAnswer is not nullNothingnullptra null reference (Nothing in Visual Basic) and contains an empty string.
Once a membership user has been created and you have a reference to a MembershipUser object for that user, you can modify the settings for that user with the MembershipUser public methods and by setting the property values of the MembershipUser object and then passing the MembershipUser object to the UpdateUser method.
If a user already exists in the data source for the application, you can obtain a MembershipUser object for the existing user with the GetUser method.
Leading and trailing spaces are trimmed from all string parameter values.