title: asp.net insert HTML from Code Behind page
body: <p>I've got a problem with ASP.NET.
  I'm using C#.</p>
  
  <p>With a SQL query i have the number exactly of rows in a Database, i need to write the same number of div tag to show the results.</p>
  
  <p>This is the code</p>
  
  <p>count is a variable that contain the number of rows.</p>
  
  <p>Projects is a List</p>
  
  <pre><code>for (int i = 0; i &lt; count; i++)
  {
      form1.Controls.Add(new Literal() { 
           ID = "ltr" + i,
  
           Text = "&lt;div class= 'container' &gt;Name = " + Projects[i].Name + " ;&lt;/div&gt;" });
  }
  </code></pre>
  
  <p>But there is a problem, i must place these div into another div with ID = Container.</p>
  
  <p>in this way Literal controls aren't placed into div#Container</p>
  
  <p>How can i do to place the For results into a div? </p>