Reputation: 26190
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.
Upvotes: 1
Views: 1133
Reputation: 77520
You can use various methods of ProfileBase:
var profile = ProfileBase.Create(username);
profile.SetPropertyValue("MyGuid", aGuid);
profile.SetPropertyValue("MyString", aString);
// etc
profile.Save()
Upvotes: 4