2

I followed the instruction here to display the user First and Last name on my page. I started the User Profile Application services to solve the issue "Cannot get user profile".

It works fine without any exception but the user's First and Last name displaying empty for all users.

I checked AD for those account to make sure their First, Last and even Display Name is available.

  1. Did anyone meet this issue before? How did you solve it?

  2. Is there any other ways to get user First, Last, Display name and his SharePoint ID?

I'm using SharePoint Designer 2010 to customize MasterPage, the information would be shown there.

My home.masterpage code:

...
<%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
...
<div id="TopMenu">
    <div class="frButton">
        <a href="#" class="expand">
            <SPSWC:ProfilePropertyLoader runat="server"></SPSWC:ProfilePropertyLoader>
            <SPSWC:ProfilePropertyValue PropertyName="FirstName" runat="server"></SPSWC:ProfilePropertyValue>&nbsp;
            <SPSWC:ProfilePropertyValue PropertyName="LastName" runat="server"></SPSWC:ProfilePropertyValue>
        </a>
    </div>
</div>

It's just this simple. And the result are empty spaces inside the <a> tag

<div id="TopMenu">
        <div class="frButton">
                <a href="#" class="expand">

                                                    &nbsp;

                </a>                                    
         </div>
</div>
  • can you provide some code – Ghost Answer Jul 17 '13 at 5:10
  • I have updated my question – Shinigamae Jul 17 '13 at 7:26
  • @GhostAnswer :) – Shinigamae Jul 17 '13 at 7:59
  • Random guess. All examples I saw for those controls utilize the self-closed tag syntax. Since SharePoint is famous for this kind of stuff (see a similar problem with the script tag) I would try that... just in case. Anyway, + 1 for the question, never heard about those tag before... nice to know they exist. – SPArchaeologist Jul 17 '13 at 8:23
  • @SPArchaeologist I tried that before. The example uses self-closed tags actually. It works fine to everyone but me. Wonder if there're some wrong settings... – Shinigamae Jul 17 '13 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.