Add multiple textbox .net
<p>I begin .net and to start I will create dynamically multiple textbox.</p>

<p>I have write this :</p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
&lt;head runat="server"&gt;
    &lt;title&gt;Page sans titre&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;form id="form1" runat="server"&gt;
    &lt;div&gt;
        &lt;asp:Button ID="Button1" runat="server" Text="Button" onclick="OnclickButton" /&gt;
    &lt;/div&gt;
    &lt;asp:TextBox ID="TextBox1" runat="server"&gt;&lt;/asp:TextBox&gt;
    &lt;br /&gt;
    &lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and this</p>

<pre><code>namespace WebApplication1
{
    public partial class _Default : System.Web.UI.Page
    {    
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void OnclickButton(object sender, EventArgs ea)
        {
            Random random = new Random();
            int randomNumber = random.Next(0, 100);

            Button btnSomeButton = sender as Button;
            btnSomeButton.Text = "I was clicked!" + randomNumber;

            TextBox txt = new TextBox();
            txt.ID = "txt_" + randomNumber;
            form1.Controls.Add(txt);
        }    
    }
}
</code></pre>

<p>I don't understand why when I click 2 time on Button1 only 1 Text Box appears.</p>

<p>Why this behavior?
What is the good way to do what I want?
thank you in advance</p>
