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 开发者_Go百科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...?
Call Membership.UpdateUser(mu).
I am not too familiar with Membership, but I would assume that you would need to actually save the changes, by calling Membership.UpdateUser:
MembershipUser mu = Membership.GetUser(username);
mu.Comment = "someComments";
Membership.UpdateUser(mu);
加载中,请稍侯......
精彩评论