Create Profile in Asp.Net 2.0

S

shapper

Hello,

On the web site I am working I have multiple profile properties, being
each one a custom class:

<add allowAnonymous="false" name="Personal"
type="MyWebSite.Profile.Collaborator" serializeAs="Binary"/>
<add allowAnonymous="false" name="Contacts"
type="MyWebSite.Profile.Contact" serializeAs="Binary"/>
<add allowAnonymous="true" name="Settings"
type="MyWebSite.Profile.Settings" serializeAs="Binary"/>

I would like to know how should I create a new profile?

I am using the following:

Dim userProfile As ProfileCommon = Profile.GetProfile(username)
With userProfile.Contacts
.City = tbCity.Text
...
End With
With userProfile.Settings
.Newsletter = cbNewsletter.Checked
...
End With
....
userProfile.Save()

I was also checking ProfileBase.Create ...

Anyway, could someone advice me on this?

Thanks,

Miguel
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top