Try Now
More in this section

Forums / General Discussions / How to add thread owner

How to add thread owner

2 posts, 0 answered
  1. anand
    anand avatar
    59 posts
    11 Jun 2008
    15 Oct 2008
    Link to this post
    I want to add name of thread creator in forum during displaying each thread. how we can add this
    I have tried this by adding template field in gridview in SigleForum.ascx control by <%$Resources:CreatedBy %>, but this is not working.

  2. Sonya
    Sonya avatar
    231 posts
    24 Sep 2012
    24 Oct 2008
    Link to this post
    Hello anand,

    Please excuse us for the delay of our response. Here is what you need to do to achieve the requested functionality:

    Open the file ~/Sitefinity/ControlTemplates/Forums/SingleForum.ascx .
    Add the highlighted code as shown in the following code:
    <asp:TemplateField HeaderText="<%$Resources:LastPost %>" HeaderStyle-CssClass="sf_forumAuthor"
        <ItemStyle CssClass="sf_forumAuthor" /> 
            <asp:LinkButton ID="goToPost" runat="server"><sfWeb:DateTimeLiteral ID="lastPostDate" runat="server" DateFormatString="dd MMM yyyy, hh:mm"></sfWeb:DateTimeLiteral></asp:LinkButton> 
            By&nbsp;  <%#Eval("Owner")%> 
            <prof:ManageProfile ID="lastPostAuthor" runat="server"
                    <asp:Label ID="FirstName" runat="Server"></asp:Label>&nbsp; 
                    <asp:Label ID="LastName" runat="Server"></asp:Label> 

    Let us know if you need further assistance.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered