title: Dynamically add link buttons in ASP.Net/VB.Net)
body: <p>How can I make dynamically add link buttons to a form in asp.net(vb.net)?</p>
  
  <p>Here is the code I tried:</p>
  
  <pre><code>&lt;form id="form1" runat="server"&gt;
      &lt;% For index As Integer = 1 To 10 %&gt;
          &lt;asp:LinkButton ID="#EVAL&lt;%=index%&gt;" runat="server"&gt;&lt;%=index%&gt;&lt;/asp:LinkButton&gt;
      &lt;% Next %&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I tried dynamically using panel, but this create problem when use <code>br</code> tag then that will not give new line.</p>
  
  <p>That code</p>
  
  <pre><code>Dim lk As LinkButton
  
  For index As Integer = 1 To 10
      lk = New LinkButton
      lk.ID = index
      lk.Text = index
      Panel1.Controls.Add(lk)
  Next
  </code></pre>