Custom CreateUser method (with additional parameters)
i have implemented custom MembershipProvider and now i would like to use CreateUserWizard to create new users.. the problem is that i want to store in the db mo开发者_如何学Pythonre information that normally (e.g. first and last name).
There is function:
public override MembershipUser CreateUser(string username, string password, string email,
string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey,
out MembershipCreateStatus status)
{
throw new NotImplementedException();
}
which i can implement but it won't store first name etc.
i found here: http://forums.asp.net/t/1496795.aspx solution that i can overload this function and call it manually but the default CreateUser function will still be called in this case...
Create your own UI or I think you can override the default template using the designer, you can say convert to template, and add to this template. You have to invoke the methods yourself though... Try tapping into the events of the control to call the correct methods.
HTH.
精彩评论