Friday, May 21, 2010

How to pull a value from a Textbox within a CreateUserWizard control

Just a little quick and dirty note. I've created a CreateUserWizard with several extra controls such as a RadioButtonList, a CheckboxList, a Textbox or two, etc.

I found myself having trouble in pulling the values from those fields in order to properly configure the new user's profile, until I finally figured this one out.

With a control called MyCustomTextbox in a CreateUserWizard called CreateUserWizard1, I can pull the value this way:

CType(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("MyCustomTextbox"), TextBox).Text

0 comments:

Post a Comment