开发者

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 开发者_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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜