开发者

How do I get a profile of a newly created user?

开发者 https://www.devze.com 2023-01-12 06:27 出处:网络
I am trying to handle add a custom field to a user profile using CreateUserWizard. I added the field to web.config as

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开发者_如何学JAVA. 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消