Create new user without login

A

AMP

Hello,
I am trying to send out an email that the person has to open and click
on in order to set Membership.IsApproved to true. I have
DisableCreatedUser="true" in the CreateUserWizard, so they are never
logged in.Does that mean GetUser(Which is looking for a logged in
user) is empty? If so, any suggestions?
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs
e)
{
MembershipUser newuser = Membership.GetUser();
RegisterUser NewRegistration = new RegisterUser();
string newusername = newuser.UserName;
string email = newuser.Email;
NewRegistration.SendNewRegistrationEmail(newusername,email);
}
Thanks
 
A

AMP

Hello,
I am trying to send out an email that the person has to open and click
on in order to set Membership.IsApproved to true. I have
DisableCreatedUser="true" in the CreateUserWizard, so they are never
logged in.Does that mean GetUser(Which is looking for a logged in
user) is empty? If so, any suggestions?
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs
e)
    {
        MembershipUser newuser = Membership.GetUser();
        RegisterUser NewRegistration = new RegisterUser();
        string newusername = newuser.UserName;
        string email = newuser.Email;
        NewRegistration.SendNewRegistrationEmail(newusername,email);
    }
Thanks

Actually its telling me this is empty:
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs
e)
{
MembershipUser newuser = Membership.GetUser();

but i have a new user in the db.
 
A

AMP

Actually its telling me this is empty:
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs
e)
   
        MembershipUser newuser = Membership.GetUser();

but i have a new user in the db.- Hide quoted text -

- Show quoted text -

Part of the problem is I cant seem to find out how to find the textbox
contained in the wizard control.
I tried a variation of:
TextBox UserNameTextBox = (TextBox)
CreateUserWizard1.ContentTemplateContainer.FindControl("UserName");
But that dont work.
Help!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,775
Messages
2,569,601
Members
45,182
Latest member
alexanderrm

Latest Threads

Top