Access to CreateUserwizard controls

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.
 
M

Michael Nemtsev

just enumerate the child controls of your root CreateUser control to find
your one
 
D

Dave

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.
 
M

Michael Nemtsev

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.
 

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,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top