views:

36

answers:

1

I am trying to handle add a custom field to a user profile using CreateUserWizard. I added the field to web.config as

<profile defaultProvider="SqlProvider">
    <providers>
      <add name="SqlProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="db" applicationName="dbapp" />
    </providers>
    <properties>
      <add name="Currency" defaultValue="HUF" allowAnonymous="true" />
    </properties>
  </profile>

And added a ListBox to the template of CreateUserWizard. I wanted to add the information to the profile in the CreateUserWizard_UserCreated event. I can retrive values, but I can't figure out how to retrive the ProfileBase of the newly created user.

A: 

Unless I am missing something, which is entirely possible as your question lacks detail, you should be able to call ProfileBase.Create(username,true) to get the profile.

Sky Sanders