• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

Show FirstName and LastName of User who made a comment

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
Simbios
Asked:
Simbios
  • 2
1 Solution
 
GeorgeGerguesCommented:
check the property called Title
0
 
SimbiosAuthor Commented:
title has nothing to do with firstname and lastname
just with comment.Owner["firstname"]

0
 
SimbiosAuthor Commented:
I solved it myself
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now