I'm using CreateUserWizard for creating an user but asp.net automatically add user to ASP.NET database I want to add user in my database and in my customer table. I have tried these code as peer below but nothing happened
private MembershipUser _CurrentUser = null;
private MembershipUser CurrentUser
{
get
{
if (_CurrentUser == null)
{
_CurrentUser = Membership.GetUser(HttpContext.Current.User.Identity.Name);
}
return _CurrentUser;
}
}
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
ProfileCommon p = (ProfileCommon)ProfileCommon.Create(CreateUserWizard1.UserName, true);
p.FirstName = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("FirstName")).Text;
p.LastName = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("LastName")).Text;
p.ContactNumber = ((TextBox)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ContactNumber")).Text;
// Save profile - must be done since we explicitly created it
p.Save();
}
Please help me to figure out my problem