开发者

Custom CreateUser method (with additional parameters)

开发者 https://www.devze.com 2022-12-22 04:39 出处:网络
i have implemented custom MembershipProvider and now i would like to use CreateUserWizard to create new users..

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号