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.

Matthew Jones
  • 25,644
  • 17
  • 102
  • 155

1 Answers1

4

You can use various methods of ProfileBase:

var profile = ProfileBase.Create(username);
profile.SetPropertyValue("MyGuid", aGuid);
profile.SetPropertyValue("MyString", aString);
// etc
profile.Save()
dahlbyk
  • 75,175
  • 8
  • 100
  • 122