Customize CreateUserWizard

A

Abdul Khaliq

Hi Everyone,
I am using Microsoft's Visual Studio .Net 2005 Beta 2 Team Suite. I am
trying to create new user with the help of CreateUserWizard, I right click
the control and clicked customized and added new fields like First Name,
Middle Name, Last Name, Phone etc. This new fields which I have created
should be going to my database in Sql and and the fields on the
CreateUserWizard will go to AspNetdb which get appended without any problem.
My problem now is that how do I access my textbox fields like TxtFirstName,
TxtMiddleName, TxtLastName in Code behind? I am able to access
CreateUserWizard1.UserName but cannot get
CreateUserWizard1.TxtFirstName.Text, so How do I get access to these fields?
Please Help and Thanks in advance.
 
R

Rodusa

Use Something Like this:
TextBox business_name =
(TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("TxtFirstName");
 
A

Abdul Khaliq

Rodusa, Thanks for your reply. The answer that u have posted for my question
gave me a compilation error as follows:
Compiler Error Message: CS0117: 'System.Web.UI.WebControls.CreateUserWizard'
does not contain a definition for 'ContentTemplateContainer'.

I have already solved this question myself and the correct answer is as
follows:
TextBox business_name =

(TextBox)CreateUserWizardStep1.CreateUserStep.ContentTemplateContainer.FindControl("TxtFirstName");
The program with the above code is running just fine.Hope this helps to
everyone.
 

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,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top