473,396 Members | 2,020 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.

creating a user with 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
0 846

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: 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: Roger23 | last post by:
I have a requirement where I need to remove or disable the entire personalization feature of my web application. I am not allowed to have a SQL express on my web server and I am not allowed to have...
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...
1
by: khairulfnd | last post by:
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...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.