How to get reference to the CreateUser button in the CreateUserWizard control?

Last post 05-15-2008 11:09 AM by OutOfTouch. 3 replies.

Sort Posts:

  • How to get reference to the CreateUser button in the CreateUserWizard control?

    05-14-2008, 4:45 PM

    Hi,

    I would like to know how I can get a reference to the Create User button in the create user wizard control so I can set it as the default button in my page and to add some javascript to it?

     

    Thank You!

  • Re: How to get reference to the CreateUser button in the CreateUserWizard control?

    05-14-2008, 6:40 PM
    • Loading...
    • johram
    • Joined on 06-13-2006, 6:36 AM
    • Sweden
    • Posts 3,352
    • Moderator

    Typically, you use FindControl method of a container to find subcontrols. I think this applies to CreateUserWizard as well. See previous post for an example: http://forums.asp.net/t/1014942.aspx

    If this post was useful to you, please mark it as answer. Thank you!
  • Re: How to get reference to the CreateUser button in the CreateUserWizard control?

    05-14-2008, 6:49 PM

    Sorry I should have been more descriptive in my question, I have tried several variations of findcontrol against the CreateUserWizard to get a reference to the create user button and the resulting object is always null or nothing. Is it possible to get a reference to the create user button? I noticed when converting the createuserwizard to a template it doesn't give you the markup for this control. I have tried the method in that post and it fails and returns null or nothing, what is the name I should be using to find it by?

     

    Thanks

  • Re: How to get reference to the CreateUser button in the CreateUserWizard control?

    05-15-2008, 11:09 AM
    Answer

    Here is the solution that worked for me although it is strange that I don't ever see the buttons text value, I am not sure at what point that gets set. I am also not sure if this would work if you had multiple steps.

    Dim myButton As Button
    myButton = CType(CreateUserWizard1.CreateUserStep.CustomNavigationTemplateContainer _
    .FindControl("StepNextButtonButton"), Button)

     
Page 1 of 1 (4 items)
Microsoft Communities
Page view counter