Hello,
I am using ASP.NET 2.0. I am trying to add textBox programmatically.
I have following method.... It is not working. What do I need to add.
public partial class Default: System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
TextBox textBox = new TextBox();
textBox.Text = "Joe";
Panel panel = new Panel();
panel.Visible = true;
panel.Controls.Add(textBox);
}
}
Thank you,

Scott LysleRank #49 · 31K reputationPosted Dec 16, 2006, 10:00 PM EST
You did not add the panel to the form in you code example (e.g., Form.Controls.Add(panel1);)