View Single Post
  #1 (permalink)  
Old March 7th, 2006, 09:37 PM
Shell84 Shell84 is offline
Authorized User
 
Join Date: Feb 2006
Location: , , .
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating custom properties using CreateUserWizard

Hi,

I'm trying to add custom properties to my user profiles, i've created a set of profiles:

<profile enabled ="true">
            <properties>
                <add name="MobileNumber"/>
                <add name="Gender" type ="string" />
                <add name="Age" type ="integer" />
            </properties>
        </profile>

And i've edited the contents of the create user wizard to have three more textboxes with ids of MobileNumber, Gender and Age.

Most examples i've seen just tell me to put in the CreateUserWizard1_CreatedUser method a simple line saying

Profile.MobileNumber = MobileNumber.Text, however this does not work as it says MobileNumber is not declared but it is.

so I have tried this instead:

Profile.MobileNumber = CreateUserWizard1.CreateUserStep.ContentTemplateCo ntainer.FindControl("MobileNumber")

but this does not work either and comes up with an error saying Value of type 'System.Web.UI.Control' cannot be converted to 'String'.

I'm quite new to coding so this may be a very simple problem to solve, i'd be grateful of any help anyone can give me