title: Garden label into Repeater to find my label
body: <p>It is such that I have a Repeater with both label and Literal content, and that is how I got it into Repeater and I would like it being like shown at the side.</p>
  
  <p>It appears with the error that tells me that it can not find my label or Literal</p>
  
  <p>Repeater her:</p>
  
  <pre><code>&lt;asp:Repeater ID="RepeaterOpslag" runat="server"&gt;
                  &lt;ItemTemplate&gt;
              &lt;div id="forslagbox" runat="server"&gt;
                  &lt;asp:Label ID="LabelBrugernavn" runat="server"&gt;&lt;/asp:Label&gt;
                  &lt;asp:Literal ID="LiteralLikesOpslag" runat="server"&gt;&lt;/asp:Literal&gt;
                  &lt;asp:Literal ID="LiteralDelete" runat="server"&gt;&lt;/asp:Literal&gt;
                  &lt;div style="margin-bottom: 5px; clear: both;"&gt;&lt;/div&gt;
                  &lt;asp:Label ID="LabelText" runat="server"&gt;&lt;/asp:Label&gt;
                  &lt;div style="margin-top: 5px; clear: both;"&gt;&lt;/div&gt;
  
                  &lt;div class="col-md-12"&gt;
                      &lt;hr class="tall" style="margin: 7px 0;"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>Default.aspx.cs here, It is in foreach which gives me problems that it will not print any of it at all.</p>
  
  <pre><code>RepeaterOpslag.DataSource = db.ForslagOpslags.ToList();
      RepeaterOpslag.DataBind();
  
      List&lt;ForslagOpslag&gt; forslagopslag = db.ForslagOpslags.ToList();
      foreach (ForslagOpslag item in forslagopslag)
      {
  
          var likesFjern = db.ForslagOpslagLikes.Where(a =&gt; a.fk_brugerid == Helper.ReturnBrugerId()).Count();
  
           LabelBrugernavn.Text = item.brugere.fornavn + " " + item.brugere.efternavn;
  
          LabelText.Text = item.text;
  
          if (likesFjern &gt;= 1)
          {
              LiteralLikesOpslag.Text = "&lt;a href='fjernsynesgodtom.aspx?id=" + item.Id + "&amp;brugerid=" + Helper.ReturnBrugerId() + "' class='btn btn-danger btn-xs'&gt;Fjern synes godt om&lt;/a&gt;";
          }
          else if (item.brugere.Id != Helper.ReturnBrugerId())
          {
              LiteralLikesOpslag.Text = "&lt;a href='SynesGodtOm.aspx?id=" + item.Id + "' class='btn btn-success btn-xs'&gt;Like opslag - " + item.ForslagOpslagLikes.Count() + " synes godt om&lt;/a&gt;";
          }
          else
          {
              LiteralLikesOpslag.Text = "&lt;p class='label label-lg label-success'&gt;" + item.ForslagOpslagLikes.Count() + " synes godt om&lt;/p&gt;";
          }
  
          if ((item.fk_brugerid == Helper.ReturnBrugerId() || Helper.BrugerRank(Helper.ReturnBrugerId()) == 1))
          {
              LiteralDelete.Text = "&lt;a href='slet.aspx?id=" + item.Id + "' class='btn btn-danger btn-xs'&gt;Slet&lt;/a&gt;";
          }
  
      }
  </code></pre>