How do I get the createuserwizard to fire using a button that is not in the createuserwizard?

Last post 07-03-2007 3:30 AM by XiaoYong Dai – MSFT. 3 replies.

Sort Posts:

  • How do I get the createuserwizard to fire using a button that is not in the createuserwizard?

    06-30-2007, 8:26 PM
    • Member
      15 point Member
    • iggabriel
    • Member since 07-03-2006, 1:05 AM
    • Posts 24

    I want the user to be able to fill out all the account creation fields, then if they click one button, it will create their account and take them to screen A. If they click another button, it will create their account and take the to screen B.

     C# please.

  • Re: How do I get the createuserwizard to fire using a button that is not in the createuserwizard?

    06-30-2007, 9:06 PM
    • Member
      472 point Member
    • REA_ANDREW
    • Member since 06-06-2006, 12:01 PM
    • Wigan England
    • Posts 119

    simply subscribe to the button click events and do what you need inside these events.

    Cheers,

    Andrew
    Blog : andrewrea.co.uk
  • Re: How do I get the createuserwizard to fire using a button that is not in the createuserwizard?

    06-30-2007, 9:18 PM
    • Member
      15 point Member
    • iggabriel
    • Member since 07-03-2006, 1:05 AM
    • Posts 24

    Can you please provide an example so I see what you mean?

  • Re: How do I get the createuserwizard to fire using a button that is not in the createuserwizard?

    07-03-2007, 3:30 AM
    Answer

    Hi

    I think the simplest method is using a Membership API like this

    Public Sub OneButton_OnClick(sender As Object, args As EventArgs)
     Dim newUser As MembershipUser = Membership.CreateUser(UsernameTextbox.Text, PasswordTextbox.Text)

     Response.Redirect("screen A")
    End Sub

    Public Sub AnotherButton_OnClick(sender As Object, args As EventArgs)
     Dim newUser As MembershipUser = Membership.CreateUser(UsernameTextbox.Text, PasswordTextbox.Text)

     Response.Redirect("screen B")
    End Sub

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (4 items)