2

I have figured out how to display users login name ...

<asp:LoginName runat="server" id="LoginName"></asp:LoginName>

But how do I display the users full name?

Thanks ... Mike

[EDIT]

I think I may have found out what I need using jQuery SPServices.

SPServices get user details

I will report back :)

1 Answer 1

1

Yep. SPServices is the best way to do that (but sounds like you figured it out already!):

var userFirstName= $().SPServices.SPGetCurrentUser({fieldName: "FirstName"});
var userFirstName= $().SPServices.SPGetCurrentUser({fieldName: "LastName"});
var userFullName = userFirstName + " " + userLastName;
1
  • 2
    Actually ... I did it using SharePoint Portal Web Controls. I registered the tags and used this tag <SPSWC:ProfilePropertyValue PropertyName="FirstName" ApplyFormatting="false" runat="server"/> Would that be wrong?
    – mdumka
    Nov 26, 2012 at 4:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.