.NET Add Parameters to Membership CreateUser function

I'm creating login functionality for my website using an access database.  Everything works until I try to add customized parameters such as first name, last name, phone number, etc.  I realized that all I really need to get everything to work is to add the new parameters to the CreateUser function in the AccessMembershipProvider.cs file.  However, I can't find where this function is called.  Where fild containing the code that calls CreateUser when the user hits the "Create User" button in the membership form?  I put the first line of the function below, with the parameters that I'm trying to add commented out.
Thanks!
public override MembershipUser CreateUser(string username,
                                           string password,
                                 //          string firstname,
                                 //          string lastname,
                                 //          string phoneNumb,
                                           string email,
                                           string passwordQuestion,
                                           string passwordAnswer,
                                           bool isApproved,
                                           object userId,
                                           out    MembershipCreateStatus status) {
 
//Code here
 
}

Open in new window

atuccilloAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

guru_samiCommented:
You cannot modify createuser method definition i.e. pass additional parameters.
Also there is not way to catch CreateUser event...
I do remember some way out in this case ...but cannot recall or don't have references handy.
But here is one option that you can try and it will work as well.
CreatedUser Event - where again you have two choices.
1: Use Asp.net Profiles. But I am never used AccessProfileProviders(not sure even if one exists)
Check this link: http://weblogs.asp.net/scottgu/archive/2005/10/18/427754.aspx
It user SqlProfileProvider but you might find somewhere AccessProfileProvider.

2: Create your own UserProfiles table. Link it with aspnet_Users table using UserId as FK relationship.
Now in CreatedUser Event handler, insert FN,LN,BD etc field values into UserProfiles Table
Check this:
http://weblogs.asp.net/gurusarkar/archive/2009/01/27/storing-user-profile-into-a-custom-table-using-createuser-wizard-control.aspx

Now the link 2 above user SqlConnection/SqlCommand objects to insert values but in your case should use OleDbConnection/Command objects.

Option 1 and 2 are almost similar but in case 1, asp.net profile provider takes care of profiletable and insert/update mechanism but in case 2, you do it manually by youself.
The concept remains same to use CreatedUser Event of CUW control.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.