title: How to bind link items to a Repeater in Sitecore
body: <p>The content tree is as follows:</p>
  
  <pre><code>content
   -News Listing
    -Article1
    -Article2
    -Article3
  </code></pre>
  
  <p>Each of the Articles is of a Data Template - "News Article" which is as:</p>
  
  <pre><code>News Article
    Article --(Field section)
      Related Articles --(Multilist - with datasource as '/content/News Listing')
  </code></pre>
  
  <p>Each article has the other 2 articles as its 'Related Articles'. For eg: Article1 has related articles 2&amp;3 and so on.</p>
  
  <p><strong>Markup:</strong></p>
  
  <pre><code>&lt;h3&gt;Related articles&lt;/h3&gt;
  &lt;asp:Repeater ID="rpArticles" runat="server" ItemType="Sitecore.Data.Items.Item"&gt;
   &lt;HeaderTemplate&gt;
      &lt;ul class="relatedArticles"&gt;
   &lt;/HeaderTemplate&gt;
   &lt;ItemTemplate&gt;
      &lt;li&gt;
        &lt;sc:Link Field="&lt;%#Item.Paths.FullPath %&gt;" runat="server" Item="&lt;%#Container.DataItem %&gt;"&gt;
            &lt;sc:Text Field="Heading" runat="server"/&gt;
        &lt;/sc:Link&gt;         
      &lt;/li&gt;                                
   &lt;/ItemTemplate&gt;
   &lt;FooterTemplate&gt;
      &lt;/ul&gt;
   &lt;/FooterTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>private void Page_Load(object sender, EventArgs e)
   {
     MultilistField relatedArticles = Sitecore.Context.Item.Fields["Related Articles"];
     rpArticles.DataSource = relatedArticles.TargetIDs.Select(id =&gt; Sitecore.Context.Database.GetItem(id));
     rpArticles.DataBind();
   }
  </code></pre>
  
  <p>The above markup is a solution from <a href="https://stackoverflow.com/questions/19919954/generallink-in-sitecore">Here</a><br>
  'Heading' is the name of the field (eg: Article1, Article2 etc..)  </p>
  
  <p>When I browse 'News Article 1', the related articles should be 2 &amp; 3, but the output is incorrect &amp; also no anchor tags. Just plain text. </p>
  
  <p>What is wrong in my code.</p>
  
  <p><strong>output:</strong></p>
  
  <blockquote>
    <p><strong>Related Articles</strong><br>
    Article1<br>
    Article1</p>
  </blockquote>