title: Dynamic Div with a table asp.net
body: <p>Is there a way to add a <strong>table</strong> and rows to a dynamically created <code>div</code> element?</p>
  
  <pre><code>Dim divTable As New HtmlGenericControl("div")
      divTable.ID = "divTable"
      divTable.Attributes("class") = "printtable"
      divTable.InnerHtml = "&lt;asp:Table ID=""table1"" CellPadding=""1"" runat=""server""&gt;  &lt;/asp:Table&gt;"
      divPlaceHolder.Controls.Add(divTable)
  </code></pre>
  
  <p>I need to add dynamic rows to <code>table1</code> but obviously whenever i try to access <code>table1</code> from the code file it says <code>'table1' not declared</code>.</p>
  
  <p>Help !</p>