razzzzer
asked on
CreatingUser problem ... createuserwizard updating one field with another
howdy experts...
i am using the createuserwizard for a register page but have a small problem. I want the userid to be an email address so i renamed the label for the username to email but left the id field as userid. I then made the email field visible = false.
i want to call the CreatingUser method to set the email field to the username field before it processes but this doesnt seem to be happening as I look into the database and the user is created but the email for that user is blank.
ive tried to set it this way here plus tried using just CreateUserWizard1.Email =
right above this code i have a
protected void CreateUserWizard1_CreatedU ser(object sender, EventArgs e)
call that works just fine
i am using the createuserwizard for a register page but have a small problem. I want the userid to be an email address so i renamed the label for the username to email but left the id field as userid. I then made the email field visible = false.
i want to call the CreatingUser method to set the email field to the username field before it processes but this doesnt seem to be happening as I look into the database and the user is created but the email for that user is blank.
ive tried to set it this way here plus tried using just CreateUserWizard1.Email =
right above this code i have a
protected void CreateUserWizard1_CreatedU
call that works just fine
protected void CreateUserWizard1_CreatingUser(object sender, LoginCancelEventArgs e)
{
CreateUserWizard cuw = (CreateUserWizard)sender;
cuw.Email = cuw.UserName;
}
ASKER
that still doenst work... the email column in database is still empty... (
That doesn't make sense. Try this to see if we can learn anything:
protected void CreateUserWizard1_Creating User(objec t sender, LoginCancelEventArgs e)
{
string name = Createuserwizard1.UserName ;
string startEmail = Createuserwizard1.Email;
Createuserwizard1.Email = Createuserwizard1.UserName ;
string endEmail = Createuserwizard1.Email;
}
Set a breakpoint in there to see what the results are.
Jim
protected void CreateUserWizard1_Creating
{
string name = Createuserwizard1.UserName
string startEmail = Createuserwizard1.Email;
Createuserwizard1.Email = Createuserwizard1.UserName
string endEmail = Createuserwizard1.Email;
}
Set a breakpoint in there to see what the results are.
Jim
ASKER
i know it doesnt make sense )
the function right above it (created) works fine...
the function right above it (created) works fine...
ASKER
hmm if i did this correctly the breakpoints never halted the code so this function isnt being called.... do i have to tell the wizard to call it? was under the impression that it would do so automatically....
Is this a delegate, or have you created a custom UserWizard class?
If it's a custom class, you would need to add:
base.CreatingUser( sender, e);
Otherwise, I'm out of ideas.
Jim
If it's a custom class, you would need to add:
base.CreatingUser( sender, e);
Otherwise, I'm out of ideas.
Jim
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
my bad... didnt have the oncreatinguser= set....
thanks!
thanks!
Good! Glad that's fixed.
Jim
Jim
protected void CreateUserWizard1_Creating
{
Createuserwizard1.Email = Createuserwizard1.UserName
}
Jim