Member_2_5230414
asked on
How to pull profile information within vb.net membership
I have stored a firstName and Surename in the profile but do not know who to retrieve it?
Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs)
Dim firstName As String = DirectCast(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("firstName"), TextBox).Text
Dim lastName As String = DirectCast(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("lastName"), TextBox).Text
Profile.SetPropertyValue("userName", firstName & " " & lastName)
End Sub
ASKER
i tried
but it shows nothing
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Label1.Text = Profile.firstName
End Sub
but it shows nothing
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://msdn.microsoft.com/en-us/library/2y3fs9xs.aspx
And there is a GetPropertyValue method as well
http://msdn.microsoft.com/en-us/library/system.web.profile.profilebase.getpropertyvalue.aspx