Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Question: Setting Profile for create new user

Reply
Thread Tools

Question: Setting Profile for create new user

 
 
VB Programmer
Guest
Posts: n/a
 
      01-16-2006
I am using personalization/profile to store info for the user that is not
contained in the aspnet_Users or aspnet_Membership tables. This info
includes, firstname, lastname, and phonenumber.

On my "signup" page I ask for all their info at one time, including
username, password, firstname, lastname, etc.... After I do a
Membership.CreateUser and Roles.AddUserToRole I want to store the profile
information. But, the code still thinks I'm 'Anynomous' when I get to the
profile part.

Here's a portion of the web.config....
<profile>
<properties>
<group name="PersonalInfo">
<add name="FirstName" />
<add name="LastName" />
<add name="PhoneNumber" />
</group >
</properties>
</profile>

Here's a portion of my code for the "Create User"...
Dim newUser As MembershipUser =
System.Web.Security.Membership.CreateUser(Me.txtUs ername.Text,
Me.txtPassword.Text, _
Me.txtEmail.Text,
Me.txtSecurityAnswer.Text, _
Me.txtSecurityAnswer.Text,
False, status)

If newUser Is Nothing Then
Me.lblUserReject.Text = GetErrorMessage(status)
Exit Sub
Else
' put new user in member role
System.Web.Security.Roles.AddUserToRole(newUser.Us erName.ToString,
"Member")

' user personalization
With Profile.PersonalInfo
.FirstName = Me.txtFirstName.Text
.LastName = Me.txtLastName.Text
.PhoneNumber = Me.txtMyPhone.Text
End With

Am I doing this correctly? Do I have the right idea? Any suggestions or
ideas?

Thanks.


 
Reply With Quote
 
 
 
 
VB Programmer
Guest
Posts: n/a
 
      01-17-2006
Any ideas folks?

"VB Programmer" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am using personalization/profile to store info for the user that is not
>contained in the aspnet_Users or aspnet_Membership tables. This info
>includes, firstname, lastname, and phonenumber.
>
> On my "signup" page I ask for all their info at one time, including
> username, password, firstname, lastname, etc.... After I do a
> Membership.CreateUser and Roles.AddUserToRole I want to store the profile
> information. But, the code still thinks I'm 'Anynomous' when I get to the
> profile part.
>
> Here's a portion of the web.config....
> <profile>
> <properties>
> <group name="PersonalInfo">
> <add name="FirstName" />
> <add name="LastName" />
> <add name="PhoneNumber" />
> </group >
> </properties>
> </profile>
>
> Here's a portion of my code for the "Create User"...
> Dim newUser As MembershipUser =
> System.Web.Security.Membership.CreateUser(Me.txtUs ername.Text,
> Me.txtPassword.Text, _
> Me.txtEmail.Text,
> Me.txtSecurityAnswer.Text, _
>
> Me.txtSecurityAnswer.Text, False, status)
>
> If newUser Is Nothing Then
> Me.lblUserReject.Text = GetErrorMessage(status)
> Exit Sub
> Else
> ' put new user in member role
>
> System.Web.Security.Roles.AddUserToRole(newUser.Us erName.ToString,
> "Member")
>
> ' user personalization
> With Profile.PersonalInfo
> .FirstName = Me.txtFirstName.Text
> .LastName = Me.txtLastName.Text
> .PhoneNumber = Me.txtMyPhone.Text
> End With
>
> Am I doing this correctly? Do I have the right idea? Any suggestions or
> ideas?
>
> Thanks.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
<profile><properties> with no Profile class Steven ASP .Net 5 10-24-2008 07:23 PM
Visual Studio 2008 asp.net web administration>profile: "The profile wasn't created"? Andy B ASP .Net 0 05-03-2008 05:15 PM
How to create the Profile object of user?? Jeff ASP .Net 2 10-13-2006 01:46 PM
Want to profile monitor for Fuji Frontier ICC profile? Lynn Digital Photography 9 09-08-2005 12:17 PM
Java Web Start app icons keep going in user profile not All Users profile Brad Java 1 07-19-2005 02:10 AM



Advertisments