Access to CreateUserwizard controls

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have a textbox on a CreateUser control. I want to assign a value to this
textbox programmatically. How can I access this control? Thanks.
 
just enumerate the child controls of your root CreateUser control to find
your one
 
I have two steps in on the createuserwizard control. Could you give me some
more details on how to refer to the email textbox? Why I try to do this is
because I want users to login using email as their username. I have the
username textbox hidden on the form and when the 'create user' button is
clicked I want the email's value to be placed in the username textbox. What
event could be used to insert value in the username textbox before the
username is validated or the data is saved.
--
L. A. Jones


Michael Nemtsev said:
just enumerate the child controls of your root CreateUser control to find
your one

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour



Dave said:
I have a textbox on a CreateUser control. I want to assign a value to this
textbox programmatically. How can I access this control? Thanks.
 
In Wizard_NextButtonClick use the sender param, cast it to the Wizard
Control, and then use WizardStep property to have acccess to the controls
inside the each wizard step

If u put single textbox control into your Wizard on Step1 and click NEXT
the following code return you the content of the textbox

(((System.Web.UI.WebControls.Wizard)(sender)).WizardSteps[0].Wizard.Controls[0].Controls[0].Controls[1].Controls[0].Controls[1].Controls[0].Controls[0].Controls[0].Controls[1] as TextBox).Text

to implement this as methods, but u should enumerate contror hierarchy and
compare the control name with each control in
WizardControl.WizardStep.Controls list

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour



Dave said:
I have two steps in on the createuserwizard control. Could you give me some
more details on how to refer to the email textbox? Why I try to do this is
because I want users to login using email as their username. I have the
username textbox hidden on the form and when the 'create user' button is
clicked I want the email's value to be placed in the username textbox. What
event could be used to insert value in the username textbox before the
username is validated or the data is saved.
--
L. A. Jones


Michael Nemtsev said:
just enumerate the child controls of your root CreateUser control to find
your one

--
WBR, Michael Nemtsev [.NET/C# MVP].
Blog: http://spaces.live.com/laflour



Dave said:
I have a textbox on a CreateUser control. I want to assign a value to this
textbox programmatically. How can I access this control? Thanks.
 
Back
Top