My problem is each time I hit the "Test" button, only one textbox is created. If I click two times, I would like two textbox to appear.
I try this solution, and it's seems to work fine except for only one thing. Each text the textbox are (re)created so I loose the value the user have entered...
Aspx:
<asp:UpdatePanel ID="upTest" runat="server">
<ContentTemplate>
<asp:Button ID="btnTest" runat="server" Text="Test" OnClick="btnTest_Click" />
<asp:Panel ID="pnTest" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
Code-behind
protected void btnTest_Click(object sender, EventArgs e)
{
pnTest.Controls.Add(new TextBox());
}