title: insert asp tags in innerHtml in a div
body: <p>I'm trying to do this kind of thing:</p>
  
  <p>aspx</p>
  
  <pre><code>   &lt;div runat="server" id="divAltriIndirizzi"&gt;
     &lt;/div&gt;
  </code></pre>
  
  <p>aspx.cs in Page_Load method</p>
  
  <pre><code>    StringBuilder sbDivIndirizzi = new StringBuilder();
      for (int i = 0; i &lt; dtInd.Rows.Count; i++)
             {
                 sbDivIndirizzi.Append("&lt;div class='row'&gt; ");
                 sbDivIndirizzi.Append("&lt;div class='col-lg-12'&gt;");
                 sbDivIndirizzi.Append("&lt;h3&gt;Indirizzo "+ (i+1).ToString() +"&lt;/h3&gt;");
                 sbDivIndirizzi.Append("&lt;div class='form-group'&gt;");
                 sbDivIndirizzi.Append("&lt;div class='row'&gt;");
                 sbDivIndirizzi.Append("&lt;div class='col-lg-8' ID='DivIndirizzo'+(i+1).ToString()&gt;");
                 sbDivIndirizzi.Append("Indirizzo:");
                 sbDivIndirizzi.Append("&lt;asp:TextBox runat='server' ID='txtIndirizzo' CssClass='form-control'/&gt;");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
             }
  
             divAltriIndirizzi.InnerHtml= sbDivIndirizzi.ToString();
  </code></pre>
  
  <p>the error is, in file BrowserLink:</p>
  
  <pre><code>          Eccezione non gestita alla riga 37, colonna 59140 in http://localhost:52479/46dd86a4956a46e08caee509120ba667/browserLink
  
            0x800a139e - Errore di run-time di JavaScript: Syntax error, unrecognized expression: unsupported pseudo: TextBox
  </code></pre>
  
  <p>What I'm doing wrong? I'm pretty new on Aspx.net.... Happy Easter!</p>
  
  <p>This is what I'm trying to do but Control c is always null:</p>
  
  <pre><code>    for (int i = 0; i &lt; dtInd.Rows.Count; i++)
             {
  
                 sbDivIndirizzi = new StringBuilder();
                 sbDivIndirizzi.Append("&lt;h3&gt;Indirizzo "+ (i+1).ToString() +"&lt;/h3&gt;");
                 sbDivIndirizzi.Append("&lt;div class='form-group'");
                 sbDivIndirizzi.Append("&lt;div class='row'&gt;");
                 sbDivIndirizzi.Append("&lt;div class='col-lg-8' ID = 'DivIndirizzo"+ (i+1).ToString()+"'&gt;");
                 sbDivIndirizzi.Append("Indirizzo:");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
                 sbDivIndirizzi.Append("&lt;/div&gt;");
  
                 divAltriIndirizzi.InnerHtml = sbDivIndirizzi.ToString();
                 Control c = null;
  
                 c=Page.FindControl("DivIndirizzo" + (i + 1).ToString());
                 if (c != null)
                      c.Controls.Add(
                     new TextBox()
                     {
                         ID = "txtIndirizzo" + (i + 1).ToString(),
                         CssClass = "form-control",
                         Text = dtInd.Rows[i]["Indirizzo"].ToString()
                     });
             }
  </code></pre>