Search code examples
c#.netasp.netmembership

MembershipUser class - Comments method doesn't work?


I'm unable to set the Comments property of a MembershipUser object.

For example:

MembershipUser mu = Membership.GetUser(username);                        
mu.Comment = "someComments";

I'd expect this to set the Comment property of mu object to "someComments" and write changes to the database.

Later, I do the following check:

mu.Comment == "someComments"; 

Comment property is set to null. Is there anything that I need to change in a web.config or...?


Solution

  • Call Membership.UpdateUser(mu).