Solved

Show FirstName and LastName of User who made a comment

Posted on 2011-03-23
3
367 Views
Last Modified: 2012-05-11
I got the following code to show some comments.

 protected void CommentRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType != ListItemType.Item && e.Item.ItemType != ListItemType.AlternatingItem)
                return;
            SocialComment comment = ((SocialComment)e.Item.DataItem);
            Literal litprice = (Literal)e.Item.FindControl("CommentedBy");
            litprice.Text = comment.Owner.DisplayName;
        }

Owner is of type UserProfile

I need to show the first and last name but I dont know how

0
Comment
Question by:Simbios
  • 2
3 Comments
 
LVL 14

Expert Comment

by:GeorgeGergues
ID: 35201503
check the property called Title
0
 

Accepted Solution

by:
Simbios earned 0 total points
ID: 35202555
title has nothing to do with firstname and lastname
just with comment.Owner["firstname"]

0
 

Author Closing Comment

by:Simbios
ID: 35230127
I solved it myself
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
Microsoft SharePoint Foundation 2010 and Microsoft SharePoint Server 2010 do not offer the option to configure the location of the SharePoint diagnostic trace log files during installation.  This can, however, be configured through Central Administr…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question