473,322 Members | 1,473 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Question: Setting Profile for create new user

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.
Jan 16 '06 #1
1 2288
Any ideas folks?

"VB Programmer" <do**@emailme.com> wrote in message
news:OM**************@TK2MSFTNGP12.phx.gbl...
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.

Jan 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: MLH | last post by:
I have created an A97 runtime distribution for the first time in my life this morning. I had precious little time to do it and was unable to create the distributable installation fileset with the...
0
by: Jesse Johnson | last post by:
I have this block of code below, but when ran it only creates the member it doesnt fill in his profile data. Is there something I am missing? Please let me know what I can do, just trying to...
7
by: scottgamble | last post by:
My company is making the switch to DB2 from Oracle. I have been working with Oracle for the last 10 years or so and still very very new to DB2. One question that has come up recently within our...
0
by: Jonathan Wood | last post by:
I seem to be having errors creating and accessing an SQL database. Unfortunatley, I am brand new to SQL setup and administration issues so this really is not my area of expertise. I know I had...
13
by: john | last post by:
I have table User-App and table App Profile User-App App Profile IDuser IDApp IDApp 1 34 34 1 45 45 2 34 2 45 2 90 3 34
0
by: benny | last post by:
Hi, i'm trying to transform an anonymous user profile to an authenticated user profile. I found this global.asax here below and there are some things i don't understand. 1) where does the...
3
by: shapper | last post by:
Hello, In my Page's VB.NET code I am changing the value of the Profile property NAME. Profile.Name = tbName.Text However, I need to change this property value from a class in my App_Code...
2
by: Henry Hollenberg | last post by:
Hello, I have written a script that uses environment variables set during a particular users login in ".bash_profile" and ".profile". I have changed to that users uid and gid in my python...
1
by: shapper | last post by:
Hello, I am using a custom Profile provider as follows: public class Profile : ProfileBase { public Bio Bio { get; set; }
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.