Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating another users profile in VS 2010

Status
Not open for further replies.
Oct 3, 2007
15
US
I have created and asp.net website that has user profiles associated with users authenticated through Active Directory. I can add the profile and view other user profiles without any problem. But if I want to update another users profile it doesn't want to work.

If I hard code the values into the update like below it works fine:

Code:
        Dim userProfile As New ProfileCommon
        userProfile = Profile.GetProfile("username")

        With userProfile
            .FirstName = "asdf"
            .LastName = "dfgh"
        End With

        userProfile.Save()

But if I try to get the updated values from textboxes like below, it won't work.

Code:
        Dim userProfile As New ProfileCommon
        userProfile = Profile.GetProfile("username")

        With userProfile
            .FirstName = txtFname.text.toString
            .LastName = txtLname.Text.ToString
        End With

        userProfile.Save()

What am I doing wrong?

Thanks,
 

Are there any error messages?



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top