How to get UserPosition property from UserSettings?

Dmitriy Nenazhenko asked on September 6, 2016 13:31

I try to get user info and corresponding settings, and try to get "UserPosition" property, but in code there is no such property.

Recent Answers

Kristian Bortnik answered on September 6, 2016 13:42 (last edited on September 6, 2016 13:43)

You could use the GetValue<T> (or GetStringValue in this case) method for getting the UserPosition property value.

var user = MembershipContext.AuthenticatedUser;
var userPosition = user.GetValue("UserPosition", string.Empty);
1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.