Link to home
Start Free TrialLog in
Avatar of Simbios
SimbiosFlag for Afghanistan

asked on

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

Avatar of GeorgeGergues
GeorgeGergues

check the property called Title
ASKER CERTIFIED SOLUTION
Avatar of Simbios
Simbios
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Simbios

ASKER

I solved it myself