views:

227

answers:

1

How do you add a profile entry (consisting of a guid, two strings, and an integer) to an existing user in the default SQL profile and membership providers? I can do this either via a sql query or C# code.

I need to add a bunch of these profiles to already existing users.

+3  A: 

You can use various methods of ProfileBase:

var profile = ProfileBase.Create(username);
profile.SetPropertyValue("MyGuid", aGuid);
profile.SetPropertyValue("MyString", aString);
// etc
profile.Save()
dahlbyk