473,396 Members | 1,933 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,396 software developers and data experts.

create user using personalization

i m trying to create a user and add a role to the user and also add its personalization like first name and last name, all at the same time but there is a problem with the personalization.
Since on the point i create the user its anonymous but is there a way to get the user from the database so that when i add the personalization it is not anonymous.

This is my codes in VB

Public Sub CreateUser_OnClick(ByVal sender As Object, ByVal args As EventArgs) Handles CreateUserButton.Click
Dim result As MembershipCreateStatus
Try

' Create new user.

Dim newUser As MembershipUser

newUser = Membership.CreateUser( _
UsernameTextbox.Text, _
PasswordTextbox.Text, _
EmailTextbox.Text)

Roles.AddUserToRole(UsernameTextbox.Text, DropDownList1.SelectedValue)

Profile.FirstName = TextBox1.Text
Profile.LastName = TextBox2.Text
Profile.ApproveLimit = TextBox3.Text
Profile.Status = TextBox4.Text

Response.Redirect("login.aspx")


Catch e As MembershipCreateUserException
Msg.Text = GetErrorMessage(e.StatusCode)
Catch e As HttpException
Msg.Text = e.Message
End Try
End Sub
Jun 25 '07 #1
1 1217
kenobewan
4,871 Expert 4TB
There's a clear relationship between user accounts and profile data. In fact, a personalization layer is mostly useful in applications that require users to register and log in. Here is an article that may help:
Personalization and User Profiles in ASP.NET 2.0
Jun 25 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Danny Tuppeny | last post by:
Hi all, I'm after some advice... I'm building a website which will have a login etc.. The Personalization in asp.net 2 stuff looks like it'll save me some time (login controls etc.), however,...
4
by: Sylvan | last post by:
I am new with this personalization stuff. Everything was working fine, however, now I always get the Login failed for user ''. The user is not associated with a trusted SQL Server connection....
1
by: VB Programmer | last post by:
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. ...
0
by: Anonieko | last post by:
Scenario: Web Parts features (like design mode) require the user to be authenticated and registered. But what if you don't want the users to go through registration but still enable...
0
by: arthernan | last post by:
I have an almost finished page that uses webparts. And this is the expected functionality. A logged on user hits a button and the button opens a WebPart. Then te user logs off, next time he logs on...
2
by: arthernan | last post by:
I have an almost finished page that uses webparts. And this is the expected functionality. A logged on user hits a button and the button opens a WebPart. Then the user logs off, next time he logs...
0
by: PaulOak | last post by:
Hi all, I have the following problem: 1. web site (asp.net 2.0 C#). 2. WebPartZone, which contains one user control. 3. SQL Server 2000 running on dedicated DB server, hosting the aspnetdb...
3
by: Electrified Research | last post by:
So I've been playing with WebParts. Very cool stuff. The personalization scope has "Shared" and "User". "Shared" allows for an admin to customize a page and how other users see that page. ...
2
by: Kees de Winter | last post by:
Hi, I am thinking about using the personalization features of .net 2.0 but I can't figure out the following. If I use the standard features of personalization, I will have users in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.