Solved

Show FirstName and LastName of User who made a comment

Posted on 2011-03-23
3
379 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When installing SharePoint 2010 RTM I came across a strange error, I was getting timeouts during the installation. I searched the web and found the best solution to be found here (http://social.msdn.microsoft.com/Forums/en-US/sharepoint2010genera…
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

697 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