Hot answers tagged


Use below code to get User name: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupValue; For User ID: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupId;


My understanding is that by using: properties.ListItem["Staff Member"].ToString(); You are going to be returned their userID and username, so it will always be returned separated by ;#. You're probably already using something like: properties.ListItem["Staff Member"].ToString().split(";#")[1]; To return the username on it's own. You should compare the ...

Only top voted, non community-wiki answers of a minimum length are eligible