title: Cannot get inner content of '' because the contents are not literal
body: <p>I am trying to iterate over the contents of a Repeater containing an html table, and use the contents of each cell. This works fine for standard HTML components, but blows up when I try to use a control. The code below will print the value of the first cell, "Item #1", but will throw an HttpException when trying to access .InnerText of the second cell. The error is as follows:</p>
  
  <pre><code>Cannot get inner content of  because the contents are not literal.
  </code></pre>
  
  <p>I have tried to use RenderControl via this solution found elsewhere, which failed for two reasons; 1) it rendered the entire HTML of the first cell and 2) it still blew up when trying to access the second cell with the following message:</p>
  
  <pre><code>'LinkButton1' of type 'LinkButton' must be placed inside 
   a form tag with runat=server
  </code></pre>
  
  <p>Is there an easy way to get the LinkButton text I'm after? Repeater code and C# can be found below.</p>
  
  <p>The repeater code:</p>
  
  <pre><code>&lt;asp:Repeater ID="Rep1" runat="server"&gt;
  &lt;HeaderTemplate&gt;
      &lt;table id="Table1" class="data"&gt;
  &lt;/HeaderTemplate&gt;
  &lt;ItemTemplate&gt;
      &lt;tr id="Row" runat="server"&gt;
          &lt;td&gt;Item #1&lt;/td&gt;
          &lt;td&gt;&lt;asp:LinkButton ID="LinkButton1" OnClick="DoSomething" 
               Text="Item #2" runat="server" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/ItemTemplate&gt;
  &lt;FooterTemplate&gt;
      &lt;/table&gt;
  &lt;/FooterTemplate&gt;
  </code></pre>
  
  <p></p>
  
  <p>The C#:</p>
  
  <pre><code>foreach (RepeaterItem item in Rep1.Items)
  {
      HtmlTableRow row = item.Controls[0].FindControl("Row") as HtmlTableRow;
  
      foreach (HtmlTableCell cell in row.Cells)
      {
          if (cell.InnerText != string.Empty) 
          {
              Console.WriteLine(cell.InnerText);
          }
      }
  }
  </code></pre>